Просмотр исходного кода

项目增加配置,及其部分功能完善

张启 4 лет назад
Родитель
Сommit
504dd050c6

+ 28 - 0
agrcloud-api/expertsmodal.js

@@ -0,0 +1,28 @@
+import request from '@/agrcloud-utils/request';
+
+// 发起咨询
+export function expertsModalAddData(data) {
+  return request({
+    url: '/sec/plaint/door',
+    method: 'POST',
+    data: data
+  });
+}
+
+// 历史咨询
+export function expertsModalListData(query) {
+  return request({
+    url: '/sec/plaint/door/list',
+    method: 'GET',
+    data: query
+  });
+}
+
+// 咨询详情
+export function expertsModalViewData(query) {
+  return request({
+    url: '/sec/plaint/door/info',
+    method: 'GET',
+    data: query
+  });
+}

+ 19 - 0
agrcloud-api/regulations.js

@@ -0,0 +1,19 @@
+import request from '@/agrcloud-utils/request';
+
+// 政策法规之列表数据
+export function regulationsListData(query) {
+  return request({
+    url: '/sec/article/door/list',
+    method: 'GET',
+    data: query
+  });
+}
+
+// 政策法规之详情数据
+export function regulationsViewData(query) {
+  return request({
+    url: '/sec/article/door/info',
+    method: 'GET',
+    data: query
+  });
+}

+ 40 - 0
agrcloud-store/modules/expertsdetail.js

@@ -0,0 +1,40 @@
+/**
+ * 封装历史投诉列表项数据缓存
+ * @author Rockery(1113269755@qq.com)
+ */
+
+const expertsDetail = {
+  state: {
+    itemData: {}
+  },
+
+  mutations: {
+    SET_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    },
+    CLEAR_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    }
+  },
+
+  actions: {
+    SetExpertsDetail({ commit }, itemData) {
+      return new Promise((resolve, reject) => {
+        if (itemData) {
+          commit('SET_ITEMDATA', itemData);
+          resolve();
+        } else {
+          reject('error');
+        }
+      });
+    },
+    ClearExpertsDetail({ commit }) {
+      return new Promise(resolve => {
+        commit('CLEAR_ITEMDATA', {});
+        resolve()
+      });
+    }
+  }
+}
+
+export default expertsDetail

+ 40 - 0
agrcloud-store/modules/expertsmodal.js

@@ -0,0 +1,40 @@
+/**
+ * 封装历史投诉列表项数据缓存
+ * @author Rockery(1113269755@qq.com)
+ */
+
+const expertsModal = {
+  state: {
+    itemData: {}
+  },
+
+  mutations: {
+    SET_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    },
+    CLEAR_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    }
+  },
+
+  actions: {
+    SetExpertsModal({ commit }, itemData) {
+      return new Promise((resolve, reject) => {
+        if (itemData) {
+          commit('SET_ITEMDATA', itemData);
+          resolve();
+        } else {
+          reject('error');
+        }
+      });
+    },
+    ClearExpertsModal({ commit }) {
+      return new Promise(resolve => {
+        commit('CLEAR_ITEMDATA', {});
+        resolve()
+      });
+    }
+  }
+}
+
+export default expertsModal

+ 40 - 0
agrcloud-store/modules/monitoringdetail.js

@@ -0,0 +1,40 @@
+/**
+ * 封装历史投诉列表项数据缓存
+ * @author Rockery(1113269755@qq.com)
+ */
+
+const monitoringDetail = {
+  state: {
+    itemData: {}
+  },
+
+  mutations: {
+    SET_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    },
+    CLEAR_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    }
+  },
+
+  actions: {
+    SetMonitoringDetail({ commit }, itemData) {
+      return new Promise((resolve, reject) => {
+        if (itemData) {
+          commit('SET_ITEMDATA', itemData);
+          resolve();
+        } else {
+          reject('error');
+        }
+      });
+    },
+    ClearMonitoringDetail({ commit }) {
+      return new Promise(resolve => {
+        commit('CLEAR_ITEMDATA', {});
+        resolve()
+      });
+    }
+  }
+}
+
+export default monitoringDetail

+ 40 - 0
agrcloud-store/modules/noticedetail.js

@@ -0,0 +1,40 @@
+/**
+ * 封装历史投诉列表项数据缓存
+ * @author Rockery(1113269755@qq.com)
+ */
+
+const noticeDetail = {
+  state: {
+    itemData: {}
+  },
+
+  mutations: {
+    SET_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    },
+    CLEAR_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    }
+  },
+
+  actions: {
+    SetNoticeDetail({ commit }, itemData) {
+      return new Promise((resolve, reject) => {
+        if (itemData) {
+          commit('SET_ITEMDATA', itemData);
+          resolve();
+        } else {
+          reject('error');
+        }
+      });
+    },
+    ClearNoticeDetail({ commit }) {
+      return new Promise(resolve => {
+        commit('CLEAR_ITEMDATA', {});
+        resolve()
+      });
+    }
+  }
+}
+
+export default noticeDetail

+ 40 - 0
agrcloud-store/modules/regulationsdetails.js

@@ -0,0 +1,40 @@
+/**
+ * 封装历史投诉列表项数据缓存
+ * @author Rockery(1113269755@qq.com)
+ */
+
+const regulationsDetails = {
+  state: {
+    itemData: {}
+  },
+
+  mutations: {
+    SET_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    },
+    CLEAR_ITEMDATA: (state, itemData) => {
+      state.itemData = itemData;
+    }
+  },
+
+  actions: {
+    SetRegulationsDetails({ commit }, itemData) {
+      return new Promise((resolve, reject) => {
+        if (itemData) {
+          commit('SET_ITEMDATA', itemData);
+          resolve();
+        } else {
+          reject('error');
+        }
+      });
+    },
+    ClearRegulationsDetails({ commit }) {
+      return new Promise(resolve => {
+        commit('CLEAR_ITEMDATA', {});
+        resolve()
+      });
+    }
+  }
+}
+
+export default regulationsDetails

+ 73 - 0
pages/experts/index.vue

@@ -0,0 +1,73 @@
+<template>
+  <view class="page-content experts">
+    <view class="page-header experts-header"></view>
+    <view class="page-main experts-content">
+      <view class="experts-content-btn">
+        <view class="experts-consultbtn">
+          <view class="consultbtn-text"
+            @click="handleConsultExpertsClick">
+            咨询专家
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  export default {
+    name: 'complaints',
+    data() {
+      return {};
+    },
+    onLoad() {},
+    methods: {
+      handleConsultExpertsClick() {
+        uni.navigateTo({
+          url: '/pages/experts/modal/index'
+        });
+      }
+    }
+  }
+</script>
+
+<style lang="scss"
+  scoped>
+  .experts {
+    padding: 0;
+
+    &-header {}
+
+    &-content {
+      width: 100%;
+
+      &-btn {
+        width: 100%;
+        position: fixed;
+        bottom: 32rpx;
+        padding: 16rpx 32rpx;
+
+        .experts-consultbtn {
+          width: 686rpx;
+          height: 88rpx;
+          background: #53A0FD;
+          border-radius: 4rpx;
+          width: 100%;
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+
+          .consultbtn-text {
+            height: 50rpx;
+            font-size: 36rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #FFFFFF;
+            line-height: 50rpx;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 19 - 0
pages/experts/modal/details.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 500 - 0
pages/experts/modal/index.vue

@@ -0,0 +1,500 @@
+<template>
+  <view class="page-content expertsmodal">
+    <view class="page-header expertsmodal-header">
+      <u-tabs
+        class="expertsmodal-tabs"
+        name="cust_tabs_name"
+        :list="tabsList"
+        :current="currentTabs"
+        height="80"
+        item-width="256"
+        gutter="50"
+        bar-width="120"
+        font-size="32"
+        @change="handletabsChange"
+      ></u-tabs>
+    </view>
+
+    <view class="page-main">
+      <template v-if="currentTabs == 0">
+        <view class="initiate-expertsmodal">
+          <u-form
+            :model="expertsModalForm"
+            label-position="top"
+            :label-style="custLabelStyle"
+            ref="expertsModalFormRef"
+          >
+            <u-form-item
+              label="真实姓名:"
+              prop="plaUser"
+              :required="true"
+              maxlength="20"
+              class="initiate-formitem"
+            >
+              <u-input
+                v-model="expertsModalForm.plaUser"
+                placeholder="请输入真实姓名"
+                :placeholder-style="custPlaceholderStyle"
+              />
+            </u-form-item>
+            <u-form-item label="手机号码:" prop="plaPhone" :required="true" class="initiate-formitem">
+              <u-input
+                v-model="expertsModalForm.plaPhone"
+                placeholder="请输入手机号码"
+                :placeholder-style="custPlaceholderStyle"
+              />
+            </u-form-item>
+            <u-form-item
+              label="咨询标题:"
+              prop="plaName"
+              :required="true"
+              maxlength="50"
+              class="initiate-formitem"
+            >
+              <u-input
+                v-model="expertsModalForm.plaName"
+                placeholder="请输入咨询标题"
+                :placeholder-style="custPlaceholderStyle"
+              />
+            </u-form-item>
+            <u-form-item
+              label="咨询内容:"
+              prop="plaContent"
+              :required="true"
+              class="mt40 initiate-formitem"
+            >
+              <u-input
+                v-model="expertsModalForm.plaContent"
+                type="textarea"
+                maxlength="200"
+                height="298"
+                placeholder="请输入不少于10个字的描述"
+                :placeholder-style="custPlaceholderStyle"
+                @input="handleSumPlacontentNum"
+              />
+              <text class="formitem-sumplacontentnum">{{ sumPlacontentNum }}/200</text>
+            </u-form-item>
+          </u-form>
+          <view class="expertsmodalform-footer">
+            <u-button
+              type="primary"
+              @click="handleComplaintsformSubmit"
+              class="complaint-submitbtn"
+            >提交</u-button>
+          </view>
+        </view>
+      </template>
+      <template v-else-if="currentTabs == 1">
+        <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">
+                <view class="history-expertsmodal-nodata">
+                  <text class="expertsmodal-nodata">暂无数据</text>
+                </view>
+              </template>
+              <template>
+                <u-row gutter="16" class="listbody-row">
+                  <u-col
+                    span="12"
+                    class="listbody-col"
+                    v-for="expertsModalItem in hisComplaintsObj.expertsModalList"
+                    :key="expertsModalItem.plaId"
+                    @click="handleComplaintsDetails(expertsModalItem)"
+                  >
+                    <view class="listbody-item">
+                      <view class="item-title">
+                        <text class="item-title-left">专家咨询</text>
+                        <text class="item-title-right">{{ expertsModalItem.plaInTime }}</text>
+                      </view>
+                      <view class="item-body">
+                        <text class="item-body-text">
+                          真实姓名:{{ expertsModalItem.plaUser }}
+                          <br />
+                          手机号码:{{ expertsModalItem.plaPhone ? expertsModalItem.plaPhone.toString().replace(/^(.{3})(.*)(.{4})$/, '$1-$2-$3') : '' }}
+                        </text>
+                        <template v-if="expertsModalItem.plaIsRe == 1">
+                          <text class="item-body-feedback">已反馈</text>
+                        </template>
+                        <template v-else>
+                          <text class="item-body-nofeedback">未反馈</text>
+                        </template>
+                      </view>
+                    </view>
+                  </u-col>
+                </u-row>
+              </template>
+              <uni-load-more
+                :status="hisComplaintsObj.loadStatus"
+                v-if="!hisComplaintsObj.list_empty"
+              ></uni-load-more>
+            </view>
+          </scroll-view>
+        </view>
+      </template>
+      <template v-else></template>
+    </view>
+  </view>
+</template>
+
+<script>
+import {
+  expertsModalAddData,
+  expertsModalListData
+} from '@/agrcloud-api/expertsmodal';
+import uniLoadMore from "@/agrcloud-components/uni-load-more/uni-load-more.vue"
+
+export default {
+  name: 'expertsmodal',
+  components: {
+    uniLoadMore
+  },
+  data() {
+    return {
+      optionType: '',
+      currentTabs: 0,
+      tabsList: [{
+        cust_tabs_name: '发起咨询'
+      },
+      {
+        cust_tabs_name: '历史咨询'
+      }
+      ],
+      expertsModalForm: {
+        plaUser: '',
+        plaPhone: '',
+        plaName: '',
+        plaContent: ''
+      },
+      expertsModalRules: {
+        plaUser: [{
+          required: true,
+          message: '请输入真实姓名',
+          trigger: ['change', 'blur']
+        }],
+        plaPhone: [{
+          required: true,
+          message: '请输入手机号码',
+          trigger: ['change', 'blur']
+        },
+        {
+          validator: (rule, value, callback) => {
+            return this.$u.test.mobile(value);
+          },
+          message: '手机号码不正确',
+          trigger: ['change', 'blur']
+        }
+        ],
+        plaName: [{
+          required: true,
+          message: '请输入咨询标题',
+          trigger: ['change', 'blur']
+        }],
+        plaContent: [{
+          required: true,
+          message: '请输入咨询内容',
+          trigger: ['change', 'blur']
+        },
+        {
+          min: 10,
+          message: '咨询内容不少于10个字',
+          trigger: ['change', 'blur']
+        }
+        ]
+      },
+      sumPlacontentNum: 0,
+      custLabelStyle: {
+
+        'font-size': '30rpx',
+        'font-family': 'PingFangSC-Regular, PingFang SC',
+        'font-weight': '400',
+      },
+      custPlaceholderStyle: 'font-size: 34rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;',
+      hisComplaintsObj: {
+        loadStatus: 'more',
+        list_empty: false,
+        pageTotal: 0,
+        pageCount: 0,
+        pagination: {
+          pageNum: 1,
+          pageSize: 10
+        },
+        expertsModalList: []
+      }
+    };
+  },
+  onLoad(option) { },
+  methods: {
+    /** 切换页签 */
+    handletabsChange(index) {
+      if (index == 1) {
+        if (!this.expertsModalForm.plaUser) {
+          this.currentTabs = 0;
+          this.$msgbox('请输入真实姓名!', 'none');
+          return;
+        }
+
+        if (!this.expertsModalForm.plaPhone) {
+          this.currentTabs = 0;
+          this.$msgbox('请输入手机号码!', 'none');
+          return;
+        }
+
+        this.hisComplaintsObj.pagination.pageNum = 1;
+        this.getComplaintsListData();
+      }
+      this.currentTabs = index;
+    },
+    /** 获取历史咨询列表 */
+    getComplaintsListData() {
+      this.hisComplaintsObj = {
+        ...this.hisComplaintsObj,
+        list_empty: false,
+        loadStatus: 'loading',
+        pageTotal: 0
+      };
+
+      // 请求获取列表数据
+      expertsModalListData({
+        ...this.hisComplaintsObj.pagination,
+        plaUser: this.expertsModalForm.plaUser,
+        plaPhone: this.expertsModalForm.plaPhone
+      }).then(res => {
+        // 数据总条数
+        this.hisComplaintsObj.pageTotal = res.total || 0;
+
+        // 如果列表为第一页,返回列表数据清空
+        if (this.hisComplaintsObj.pagination.pageNum == 1) {
+          this.hisComplaintsObj.expertsModalList = [];
+        };
+
+        // 处理返回结果
+        if ((res.rows || []).length <= 0) { // 返回结果没有数据
+          if ((this.hisComplaintsObj.expertsModalList || []).length <= 0) {
+            this.hisComplaintsObj.loadStatus = 'noMores';
+            this.hisComplaintsObj.list_empty = true;
+          } else {
+            this.hisComplaintsObj.loadStatus = 'noMores';
+          }
+        } else { //返回结果有数据
+          //返回历史咨询列表存在
+          this.hisComplaintsObj.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--;
+            }
+          } else {
+            this.hisComplaintsObj.pageCount--;
+          };
+
+          // 处理页面状态
+          if (this.hisComplaintsObj.pageCount === 0) {
+            this.hisComplaintsObj.loadStatus = 'noMores'
+          } else {
+            this.hisComplaintsObj.loadStatus = 'more'
+          }
+
+          // 组装返回数据
+          this.hisComplaintsObj.expertsModalList.push.apply(this.hisComplaintsObj.expertsModalList, res.rows || []);
+
+          uni.stopPullDownRefresh();
+        }
+
+      }).catch(err => {
+        this.hisComplaintsObj.loadStatus = 'noMores';
+      });
+    },
+    handleComplaintsformSubmit() {
+      this.$refs.expertsModalFormRef && this.$refs.expertsModalFormRef.validate(valid => {
+        if (valid) {
+          expertsModalAddData(this.expertsModalForm).then(
+            res => {
+              this.$msgbox('操作成功!', 'success');
+              this.expertsModalForm = {
+                ...this.expertsModalForm,
+                plaName: '',
+                plaContent: ''
+              };
+              uni.navigateTo({
+                url: '/pages/results/index'
+              });
+            }
+          );
+        }
+      });
+    },
+    handleScrolltolower() {
+      this.hisComplaintsObj.loadStatus = 'loading'
+      if (this.hisComplaintsObj.pagination.pageNum - 1 >= this.hisComplaintsObj.pageCount) {
+        this.hisComplaintsObj.loadStatus = 'noMores';
+        return
+      } else {
+        this.hisComplaintsObj.pagination.pageNum++;
+        this.getComplaintsListData();
+      }
+    },
+    handleSumPlacontentNum() {
+      this.sumPlacontentNum = this.expertsModalForm.plaContent.length;
+      if (this.sumPlacontentNum == 200) {
+        this.$msgbox('最多只能输入240个字!', 'none');
+      }
+    },
+    handleComplaintsDetails(param) {
+      this.$store.dispatch("SetComplaintsDetails", param).then(() => {
+        uni.navigateTo({
+          url: '/pages/experts/modal/details'
+        });
+      }).catch(() => {
+        this.$msgbox('访问数据异常!', 'none');
+      });
+    }
+  },
+  onReady() {
+    this.$refs.expertsModalFormRef && this.$refs.expertsModalFormRef.setRules(this.expertsModalRules);
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.expertsmodal {
+  padding: 0;
+
+  &-header {
+    width: 100%;
+    border-top: 2rpx solid #eeeeee;
+    border-bottom: 2rpx solid #eeeeee;
+  }
+
+  .expertsmodal-tabs {
+    height: 87rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+  }
+
+  .initiate-expertsmodal {
+    .initiate-formitem {
+      padding-left: 24rpx;
+      background: #ffffff;
+
+      .formitem-sumplacontentnum {
+        position: absolute;
+        bottom: 0;
+        right: 0;
+      }
+    }
+  }
+
+  .expertsmodalform-footer {
+    padding: 40rpx 32rpx;
+
+    .complaint-submitbtn {
+      height: 88rpx;
+    }
+  }
+
+  .hiscomplaint-item {
+    background: #ffffff;
+  }
+
+  .history-expertsmodal {
+    .scroll-Y {
+      height: calc(
+        100vh - 88rpx - 100rpx - env(safe-area-inset-bottom) -
+          var(--status-bar-height)
+      );
+    }
+
+    .history-expertsmodal-listbody {
+      .history-expertsmodal-nodata {
+        text-align: center;
+        margin-top: 20rpx;
+
+        .expertsmodal-nodata {
+          font-size: 30rpx;
+          color: #777777;
+        }
+      }
+
+      .listbody-row {
+        .listbody-col {
+          padding: 24rpx 0 0 0 !important;
+
+          .listbody-item {
+            background: #ffffff;
+            height: 196rpx;
+            width: 100%;
+
+            .item-title {
+              padding-top: 24rpx;
+
+              .item-title-left {
+                float: left;
+                height: 48rpx;
+                font-size: 34rpx;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: #333333;
+                line-height: 48rpx;
+                padding-left: 24rpx;
+              }
+
+              .item-title-right {
+                float: right;
+                height: 48rpx;
+                font-size: 30rpx;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #999999;
+                line-height: 48rpx;
+                padding-right: 24rpx;
+              }
+            }
+
+            .item-body {
+              clear: both;
+              padding: 16rpx 0 0 24rpx;
+
+              .item-body-text {
+                height: 84rpx;
+                font-size: 30rpx;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #666666;
+                line-height: 42rpx;
+              }
+
+              .item-body-nofeedback {
+                float: right;
+                padding-right: 24rpx;
+                height: 42rpx;
+                font-size: 30rpx;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: #fd4779;
+                line-height: 42rpx;
+              }
+
+              .item-body-feedback {
+                float: right;
+                padding-right: 24rpx;
+                height: 42rpx;
+                font-size: 30rpx;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: #48a79e;
+                line-height: 42rpx;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 19 - 0
pages/meteorological/index.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 0
pages/monitoring/index.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 0
pages/notice/index.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 228 - 0
pages/regulations/details/index.vue

@@ -0,0 +1,228 @@
+<template>
+  <view class="page-content complaintsdetails">
+    <view class="complaintsdetails-content">
+      <view class="complaintsdetails-item complaintsdetails-plauser">
+        <view class="item-content">
+          <view class="item-text">
+            <view class="item-textlable">
+              <text class="item-lable">标题:</text>
+            </view>
+            <view class="item-textvalue">
+              <text class="item-value">{{ regulationsDetailsObj.artTitle }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="complaintsdetails-item complaintsdetails-plaphone">
+        <view class="item-content">
+          <view class="item-text">
+            <view class="item-textlable">
+              <text class="item-lable">作者:</text>
+            </view>
+            <view class="item-textvalue">
+              <text class="item-value">{{ regulationsDetailsObj.artAuthor }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="complaintsdetails-item complaintsdetails-planame">
+        <view class="item-content">
+          <view class="item-text">
+            <view class="item-textlable">
+              <text class="item-lable">简介:</text>
+            </view>
+            <view class="item-textvalue">
+              <text class="item-value">{{ regulationsDetailsObj.artSummary }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="complaintsdetails-placontent">
+        <view class="placontent-text">
+          <view class="placontent-textlable">
+            <text class="placontent-lable">内容:</text>
+          </view>
+          <view class="placontent-textvalue">
+            <view class="u-content">
+              <u-parse
+                :html="regulationsDetailsObj.artContent"
+                :selectable="false"
+                :show-with-animation="true"
+              ></u-parse>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { regulationsViewData } from '@/agrcloud-api/regulations';
+
+export default {
+  name: 'regulationsDetails',
+  data() {
+    return {
+      regulationsDetailsObj: {
+        artTitle: '',
+        artAuthor: '',
+        artSummary: '',
+        artContent: ''
+      }
+    };
+  },
+  onLoad() {
+    this.initData();
+  },
+  methods: {
+    /** 初始化数据 */
+    initData() {
+      const currComplaintsDetailsItem = (this.$store.getters || {}).regulationsDetailsObj || {};
+      regulationsViewData({
+        id: currComplaintsDetailsItem.artId
+      }).then(res => {
+        this.regulationsDetailsObj = res.data || {};
+      }).catch(() => {
+        this.regulationsDetailsObj = {};
+      });
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.complaintsdetails {
+  padding: 0;
+
+  .complaintsdetails-content {
+    width: 100%;
+    padding-top: 24rpx;
+
+    .complaintsdetails-item {
+      height: 138rpx;
+      padding-left: 24rpx;
+      background-color: #ffffff;
+
+      .item-content {
+        height: 138rpx;
+        border-bottom: 1px solid #eeeeee;
+
+        .item-text {
+          padding: 24rpx 24rpx 24rpx 0;
+
+          .item-textlable {
+            height: 42rpx;
+            line-height: 42rpx;
+
+            .item-lable {
+              height: 42rpx;
+              font-size: 30rpx;
+              font-family: PingFangSC-Regular, PingFang SC;
+              font-weight: 400;
+              color: #666666;
+              line-height: 42rpx;
+            }
+          }
+
+          .item-textvalue {
+            height: 48rpx;
+            line-height: 48rpx;
+
+            .item-value {
+              height: 48rpx;
+              font-size: 34rpx;
+              font-family: PingFangSC-Regular, PingFang SC;
+              font-weight: 400;
+              color: #333333;
+              line-height: 48rpx;
+            }
+          }
+        }
+      }
+    }
+
+    .complaintsdetails-placontent {
+      margin-top: 24rpx;
+      background-color: #ffffff;
+      min-height: 154rpx;
+
+      .placontent-text {
+        padding: 24rpx;
+
+        .placontent-textlable {
+          height: 42rpx;
+          line-height: 42rpx;
+
+          .placontent-lable {
+            height: 42rpx;
+            font-size: 30rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #666666;
+            line-height: 42rpx;
+          }
+        }
+
+        .placontent-textvalue {
+          .placontent-textarea {
+            min-height: 48rpx;
+            font-size: 34rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+          }
+        }
+      }
+    }
+
+    .complaintsdetails-plares {
+      margin-top: 24rpx;
+      background-color: #ffffff;
+      min-height: 154rpx;
+
+      .plares-text {
+        padding: 24rpx;
+
+        .plares-textlable {
+          height: 42rpx;
+          line-height: 42rpx;
+
+          .plares-lable {
+            height: 42rpx;
+            font-size: 30rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #666666;
+            line-height: 42rpx;
+          }
+        }
+
+        .plares-textvalue {
+          .plares-textarea {
+            min-height: 48rpx;
+            font-size: 34rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+          }
+        }
+
+        .plares-textnovalue {
+          height: 48rpx;
+          line-height: 48rpx;
+
+          .plares-value {
+            height: 48rpx;
+            font-size: 34rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+            line-height: 48rpx;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 224 - 0
pages/regulations/index.vue

@@ -0,0 +1,224 @@
+<template>
+  <view class="regulations">
+    <view class="regulations-content">
+      <scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="handleScrolltolower">
+        <view class="regulations-listbody">
+          <!-- 列表无数据 -->
+          <template v-if="list_empty">
+            <view class="regulations-listbody-nodata">
+              <text class="regulations-listbody-nodata-text">暂无数据</text>
+            </view>
+          </template>
+
+          <!-- 列表有数据 -->
+          <template v-else>
+            <view
+              class="listbody-item"
+              v-for="regulationsItem in regulationsList"
+              :key="regulationsItem.id"
+              @click="handleRegulationsDetails(regulationsItem)"
+            >
+              <view class="item-container">
+                <view class="container-left">
+                  <view class="left-title">{{ regulationsItem.artTitle }}</view>
+                  <view class="left-releasetime">发布时间:{{ regulationsItem.artInTime }}</view>
+                </view>
+                <view class="container-right">
+                  <view class="right-content">
+                    <image
+                      src="../../static/test-images/test-image-01.png"
+                      mode="scaleToFill"
+                      class="right-content-image"
+                    />
+                  </view>
+                </view>
+                <view style="clear: both;"></view>
+              </view>
+            </view>
+          </template>
+
+          <!-- 加载更多组件 -->
+          <uni-load-more :status="loadStatus" v-if="!list_empty"></uni-load-more>
+        </view>
+      </scroll-view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { regulationsListData } from '@/agrcloud-api/regulations';
+import uniLoadMore from "@/agrcloud-components/uni-load-more/uni-load-more.vue"
+
+export default {
+  name: 'regulations',
+  components: {
+    uniLoadMore
+  },
+  data() {
+    return {
+      loadStatus: 'more',
+      list_empty: false,
+      pageTotal: 0,
+      pageCount: 0,
+      pagination: {
+        artCategoryId: '0',
+        pageNum: 1,
+        pageSize: 10
+      },
+      regulationsList: []
+    };
+  },
+  onLoad() {
+    this.initData();
+  },
+  methods: {
+    /** 初始化数据 */
+    initData() {
+      this.getRegulationsListData();
+    },
+    /** 获取政策法规之列表数据 */
+    getRegulationsListData() {
+      this.list_empty = false;
+      this.loadStatus = 'loading';
+
+      regulationsListData(this.pagination).then(res => {
+        // 数据总条数
+        this.pageTotal = res.total || 0;
+
+        // 如果列表为第一页,返回列表数据清空
+        if (this.pagination.pageNum == 1) {
+          this.regulationsList = [];
+        };
+
+        // 处理返回结果
+        if ((res.rows || []).length <= 0) { // 返回结果没有数据
+          if ((this.regulationsList || []).length <= 0) {
+            this.loadStatus = 'noMores';
+            this.list_empty = true;
+          } else {
+            this.loadStatus = 'noMores';
+          }
+        } else { //返回结果有数据
+          this.list_empty = false;
+
+          // 获取列表数据分页数量
+          this.pageCount = Math.ceil((res.total || 0) / this.pagination.pageSize);
+          if ((res.total || 0) % this.pagination.pageSize == 0) {
+            this.pageCount = Math.ceil((res.total || 0) / this.pagination.pageSize);
+            if (this.pageCount == 1) {
+              this.pageCount--;
+            }
+          } else {
+            this.pageCount--;
+          };
+
+          // 处理页面状态
+          if (this.pageCount === 0) {
+            this.loadStatus = 'noMores'
+          } else {
+            this.loadStatus = 'more'
+          }
+
+          // 组装返回数据
+          this.regulationsList.push.apply(this.regulationsList, res.rows || []);
+
+          uni.stopPullDownRefresh();
+        }
+
+      }).catch(err => {
+        this.loadStatus = 'noMores';
+      });
+    },
+    handleScrolltolower() {
+      this.loadStatus = 'loading'
+      if (this.pagination.pageNum - 1 >= this.pageCount) {
+        this.loadStatus = 'noMores';
+        return;
+      } else {
+        this.pagination.pageNum++;
+        this.getRegulationsListData();
+      }
+    },
+    /** 政策法规之详情数据操作 */
+    handleRegulationsDetails(param) {
+      this.$store.dispatch("SetRegulationsDetails", param).then(() => {
+        uni.navigateTo({
+          url: '/pages/regulations/details/index'
+        });
+      }).catch(() => {
+        this.$msgbox('访问数据异常!', 'none');
+      });
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.regulations {
+  padding-top: 25rpx;
+  width: 100%;
+
+  .regulations-content {
+    width: 100%;
+
+    .regulations-listbody {
+      width: 100%;
+
+      .listbody-item {
+        width: 750rpx;
+        height: 208rpx;
+        background: #ffffff;
+        margin-bottom: 24rpx;
+
+        .item-container {
+          padding: 24rpx;
+
+          .container-left {
+            float: left;
+            width: 478rpx;
+
+            .left-title {
+              height: 84rpx;
+              font-size: 30rpx;
+              font-family: PingFangSC-Medium, PingFang SC;
+              font-weight: 500;
+              color: #333333;
+              line-height: 42rpx;
+            }
+
+            .left-releasetime {
+              margin-top: 16rpx;
+            }
+          }
+
+          .container-right {
+            float: left;
+            margin-left: 24rpx;
+
+            .right-content {
+              width: 200rpx;
+              height: 160rpx;
+              border-radius: 8rpx;
+
+              .right-content-image {
+                width: 200rpx;
+                height: 160rpx;
+              }
+            }
+          }
+        }
+      }
+
+      &-nodata {
+        text-align: center;
+        margin-top: 20rpx;
+
+        &-text {
+          font-size: 30rpx;
+          color: #777777;
+        }
+      }
+    }
+  }
+}
+</style>