Commit 5bbfac44e688953b5a97e05a6c5e585f5f13c3c2

Authored by 易尊强
1 parent bd028579

28号下午提交

apis/user/account.js
@@ -36,4 +36,9 @@ export default { @@ -36,4 +36,9 @@ export default {
36 GetCurrentbalance(data){ 36 GetCurrentbalance(data){
37 return request.get('/Users/GetCurrentbalance',data) 37 return request.get('/Users/GetCurrentbalance',data)
38 }, 38 },
  39 + // 通知修改为已读
  40 + updateInfoTell(id){
  41 + // ALERT(1111)
  42 + return request.put(`/api/extend/demo/UpdateIsReadEnd?MessageId=`+id,null)
  43 + },
39 } 44 }
pages.json
@@ -426,6 +426,30 @@ @@ -426,6 +426,30 @@
426 "navigationBarTitleText" : "通知详情填写", 426 "navigationBarTitleText" : "通知详情填写",
427 "enablePullDownRefresh" : false 427 "enablePullDownRefresh" : false
428 } 428 }
  429 + },
  430 + {
  431 + "path" : "pages/Feedback/reponseAppeal/reponseAppeal",
  432 + "style" :
  433 + {
  434 + "navigationBarTitleText" : "诉求信息",
  435 + "enablePullDownRefresh" : false
  436 + }
  437 + },
  438 + {
  439 + "path" : "pages/my/userReponse/userReponse",
  440 + "style" :
  441 + {
  442 + "navigationBarTitleText" : "诉求列表",
  443 + "enablePullDownRefresh" : false
  444 + }
  445 + },
  446 + {
  447 + "path" : "pages/my/adminMessageList/adminMessageList",
  448 + "style" :
  449 + {
  450 + "navigationBarTitleText" : "管理员信息列表",
  451 + "enablePullDownRefresh" : false
  452 + }
429 } 453 }
430 454
431 // { 455 // {
pages/Feedback/Feedback.scss
@@ -29,6 +29,38 @@ @@ -29,6 +29,38 @@
29 } 29 }
30 } 30 }
31 } 31 }
  32 +.item-box{
  33 + width: 96%;
  34 + margin: 0 auto;
  35 + margin-top: 20rpx;
  36 + border-radius: 30rpx;
  37 + background-color: white;
  38 + padding: 20rpx;
  39 + display: flex;
  40 + justify-content: space-between;
  41 + align-items: center;
  42 + .lef{
  43 + width: 60%;
  44 + // background-color: red;
  45 + overflow: hidden;
  46 + white-space: nowrap;
  47 + text-overflow: ellipsis;
  48 + }
  49 + .rig{
  50 + display: flex;
  51 + align-items: center;
  52 + .status{
  53 + font-size: 20rpx;
  54 + }
  55 + button{
  56 + margin-left: 20rpx;
  57 + font-size: 20rpx;
  58 + width: 150rpx;
  59 + background-color: dodgerblue;
  60 + color: white;
  61 + }
  62 + }
  63 +}
32 /* 反馈类型 */ 64 /* 反馈类型 */
33 .feedback-type{ 65 .feedback-type{
34 position: relative; 66 position: relative;
pages/Feedback/Feedback.vue
1 <template> 1 <template>
2 - <view class="page"> 2 + <!-- 管理员查看页面 -->
  3 + <view class="page" v-if="userCode === 'admin'">
  4 + <!-- <zb-tab
  5 + :activeStyle="{
  6 + fontWeight: 'bold',
  7 + transform: 'scale(1.1)'
  8 + }"
  9 + :data="list"
  10 + v-model="active"
  11 + ></zb-tab> -->
  12 + <view class="item-box" v-for="(it,index) in appealList" :key="index" @click="toReponse(it.id)">
  13 + <view class="lef">
  14 + {{it.content}}
  15 + </view>
  16 + <view class="rig">
  17 + <view class="status" v-if="it.status == null" style="color: red;">
  18 + 未处理
  19 + </view>
  20 + <view class="status" v-else>
  21 + {{it.status}}
  22 + </view>
  23 + <view class="button">
  24 + <button >查看/处理</button>
  25 + </view>
  26 + </view>
  27 + </view>
  28 + </view>
  29 + <!-- 普通用户页面 -->
  30 + <view class="page" v-else>
3 <!-- 反馈内容 --> 31 <!-- 反馈内容 -->
4 <view class="feedback-data"> 32 <view class="feedback-data">
5 <view class="titleall-box"> 33 <view class="titleall-box">
@@ -42,11 +70,14 @@ @@ -42,11 +70,14 @@
42 <text>提交</text> 70 <text>提交</text>
43 </view> 71 </view>
44 </view> 72 </view>
  73 +
  74 +
45 </template> 75 </template>
46 76
47 <script> 77 <script>
48 import { data } from '../../uview-ui/libs/mixin/mixin'; 78 import { data } from '../../uview-ui/libs/mixin/mixin';
49 import request from '@/utils/request.js' 79 import request from '@/utils/request.js'
  80 +import { use } from 'echarts';
50 export default { 81 export default {
51 data() { 82 data() {
52 return { 83 return {
@@ -55,7 +86,22 @@ import request from &#39;@/utils/request.js&#39; @@ -55,7 +86,22 @@ import request from &#39;@/utils/request.js&#39;
55 // 填写诉求内容 86 // 填写诉求内容
56 requires:'', 87 requires:'',
57 type:"", 88 type:"",
58 - lastModifyUserId:'' 89 + lastModifyUserId:'',
  90 + userCode:'',
  91 + list:[{
  92 + name: '未处理',
  93 + value: 0,
  94 + }, {
  95 + name: '已处理',
  96 + value: 1,
  97 + }, {
  98 + name: '忽略',
  99 + value: 2,
  100 + }, {
  101 + name: '无效',
  102 + value: 3,
  103 + }],
  104 + appealList:[]
59 }; 105 };
60 106
61 }, 107 },
@@ -63,13 +109,15 @@ import request from &#39;@/utils/request.js&#39; @@ -63,13 +109,15 @@ import request from &#39;@/utils/request.js&#39;
63 this.getUser() 109 this.getUser()
64 let user = uni.getStorageSync('user') 110 let user = uni.getStorageSync('user')
65 this.lastModifyUserId = user.userInfo.userId 111 this.lastModifyUserId = user.userInfo.userId
66 - 112 + this.getAppealList()
67 }, 113 },
68 methods:{ 114 methods:{
69 // 获取用户信息 115 // 获取用户信息
70 getUser(){ 116 getUser(){
71 if (uni.getStorageSync('user')) { 117 if (uni.getStorageSync('user')) {
72 - // this.userCode = uni.getStorageSync('user').data.user.userInfo 118 + let userCode = uni.getStorageSync('user').userInfo.userId
  119 + console.log('this.userCode',userCode)
  120 + this.userCode = userCode
73 // this.userInfo = this.userCode.userAccount 121 // this.userInfo = this.userCode.userAccount
74 // this.userInfo = '123456' 122 // this.userInfo = '123456'
75 console.log('用户已登录!') 123 console.log('用户已登录!')
@@ -128,7 +176,29 @@ import request from &#39;@/utils/request.js&#39; @@ -128,7 +176,29 @@ import request from &#39;@/utils/request.js&#39;
128 FeedbackTypeCh(val){ 176 FeedbackTypeCh(val){
129 console.log(val); 177 console.log(val);
130 this.TypeIndex = val.detail.value; 178 this.TypeIndex = val.detail.value;
131 - } 179 + },
  180 + // 获取诉求列表
  181 + getAppealList(){
  182 + request({
  183 + url:'/api/Extend/baseappealinformation',
  184 + method:'get',
  185 + data:{
  186 + pageSize:10000,
  187 + // status:status
  188 + }
  189 + }).then(res=>{
  190 + console.log(res)
  191 + if(res.code === 200){
  192 + this.appealList = res.data.list
  193 + }
  194 + })
  195 + },
  196 + // 跳转到查看和修改页面
  197 + toReponse(id){
  198 + uni.navigateTo({
  199 + url:'/pages/Feedback/reponseAppeal/reponseAppeal?data=' + JSON.stringify(id)
  200 + })
  201 + },
132 } 202 }
133 } 203 }
134 </script> 204 </script>
pages/Feedback/reponseAppeal/Feedback.scss 0 → 100644
  1 +.page{
  2 + position: absolute;
  3 + left: 0;
  4 + top: 0;
  5 + width: 100%;
  6 + height: 100%;
  7 + background-color: #f6f6f6;
  8 +}
  9 +.titleall-box {
  10 + display: flex;
  11 + justify-content: space-between;
  12 + padding: 40rpx 20rpx 20rpx 0;
  13 + .titleall-left {
  14 + font-size: 32rpx;
  15 + font-weight: bold;
  16 + display: flex;
  17 + align-items: center;
  18 + .titleall-left-line {
  19 + width: 14rpx;
  20 + height: 36rpx;
  21 + border-radius: 0 10rpx 10rpx 0;
  22 + background-color: #E60012;
  23 + box-shadow: 0 0 10rpx 5rpx #fbdadc;
  24 + margin-right: 20rpx;
  25 + }
  26 + text {
  27 + font-size: 28rpx;
  28 + color: #999999;
  29 + }
  30 + }
  31 +}
  32 +/* 反馈类型 */
  33 +.feedback-type{
  34 + position: relative;
  35 + display: flex;
  36 + align-items: center;
  37 + justify-content: space-between;
  38 + width: 94%;
  39 + height: 100rpx;
  40 + margin: 20rpx auto;
  41 + background-color: #FFFFFF;
  42 + border-radius: 20rpx;
  43 + padding: 0 4%;
  44 + .feedback-type-left {
  45 + color: #909090;
  46 + }
  47 + .title{
  48 + display: flex;
  49 + align-items: center;
  50 + text{
  51 + font-size: 26rpx;
  52 + }
  53 + }
  54 + .picker{
  55 + position: absolute;
  56 + width: 100%;
  57 + height: 100%;
  58 + opacity: 0;
  59 + }
  60 + .more{
  61 + display: flex;
  62 + align-items: center;
  63 + text{
  64 + color: #000;
  65 + font-size: 34rpx;
  66 + }
  67 + image {
  68 + width: 20rpx;
  69 + height: 20rpx;
  70 + margin-left: 10rpx;
  71 + }
  72 + }
  73 + .feedback-type-right {
  74 + display: flex;
  75 + align-items: center;
  76 + }
  77 +}
  78 +.example-body {
  79 + padding: 10px;
  80 + padding-top: 0;
  81 + }
  82 +
  83 + .custom-image-box {
  84 + /* #ifndef APP-NVUE */
  85 + display: flex;
  86 + /* #endif */
  87 + flex-direction: row;
  88 + justify-content: space-between;
  89 + align-items: center;
  90 + }
  91 +
  92 + .text {
  93 + font-size: 14px;
  94 + color: #333;
  95 + }
  96 +.segmented-control {
  97 + margin-bottom: 15px;
  98 + }
  99 +
  100 + .button-group {
  101 + margin-top: 15px;
  102 + display: flex;
  103 + justify-content: space-around;
  104 + }
  105 +
  106 + .form-item {
  107 + display: flex;
  108 + align-items: center;
  109 + }
  110 +
  111 + .button {
  112 + display: flex;
  113 + align-items: center;
  114 + height: 35px;
  115 + margin-left: 10px;
  116 + }
  117 +/* 反馈内容 */
  118 +.feedback-data{
  119 + width: 94%;
  120 + // height: 600rpx;
  121 + margin: 20rpx auto;
  122 + background-color: #FFFFFF;
  123 + border-radius: 20rpx;
  124 + .content{
  125 + padding: 20rpx;
  126 + textarea{
  127 + width: 94%;
  128 + height: 320rpx;
  129 + background-color: #f6f6f6;
  130 + border-radius: 20rpx;
  131 + padding: 20rpx;
  132 + font-size: 26rpx;
  133 + color: #222222;
  134 + }
  135 + }
  136 + .voucher-img{
  137 + display: flex;
  138 + align-items: center;
  139 + padding: 0 20rpx;
  140 + height: 240rpx;
  141 + margin-top: 20rpx;
  142 + .list{
  143 + width: 33%;
  144 + height: 100%;
  145 + image{
  146 + width: 160rpx;
  147 + height: 160rpx;
  148 + border-radius: 10rpx;
  149 + }
  150 + }
  151 + }
  152 +}
  153 +
  154 +/* 联系方式 */
  155 +.contact-way{
  156 + display: flex;
  157 + align-items: center;
  158 + justify-content: center;
  159 + width: 94%;
  160 + height: 100rpx;
  161 + margin: 20rpx auto;
  162 + background-color: #FFFFFF;
  163 + border-radius: 20rpx;
  164 + input{
  165 + width: 100%;
  166 + height: 100%;
  167 + padding: 0 4%;
  168 + font-size: 26rpx;
  169 + color: #222222;
  170 + }
  171 +}
  172 +
  173 +/* 提交 */
  174 +.submit-btn{
  175 + display: flex;
  176 + align-items: center;
  177 + justify-content: center;
  178 + width: 94%;
  179 + height: 80rpx;
  180 + margin: 30rpx auto;
  181 + background: #E60012;
  182 + border-radius: 80rpx;
  183 + text{
  184 + color: #FFFFFF;
  185 + font-size: 28rpx;
  186 + }
  187 +}
0 \ No newline at end of file 188 \ No newline at end of file
pages/Feedback/reponseAppeal/reponseAppeal.vue 0 → 100644
  1 +<template>
  2 + <view class="page">
  3 + <!-- 反馈内容 -->
  4 + <view class="feedback-data">
  5 + <view class="titleall-box">
  6 + <view class="titleall-left">
  7 + <view class="titleall-left-line"></view>回复信息
  8 + </view>
  9 + </view>
  10 + <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" style="width: 96%;margin: 0 auto;">
  11 + <uni-forms-item label="内容" required name="title">
  12 + <uni-easyinput v-model="valiFormData.title" disabled />
  13 + </uni-forms-item>
  14 + <uni-forms-item label="模块" required name="subTitle">
  15 + <uni-easyinput v-model="valiFormData.subTitle" disabled />
  16 + </uni-forms-item>
  17 + <uni-forms-item label="回复内容">
  18 + <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入" />
  19 + </uni-forms-item>
  20 + </uni-forms>
  21 + <!-- 选择反馈类型 -->
  22 + <view class="feedback-type">
  23 + <view class="feedback-type-left">状态</view>
  24 + <view class="feedback-type-right">
  25 + <view class="title">
  26 + <text>{{TypeArray[TypeIndex]}}</text>
  27 + </view>
  28 + <view class="picker">
  29 + <picker @change="FeedbackTypeCh" :value="TypeIndex" :range="TypeArray">
  30 + <view class="uni-input">{{TypeArray[TypeIndex]}}</view>
  31 + </picker>
  32 + </view>
  33 + <view class="more">
  34 + <image src="../../../static/down1.png"></image>
  35 + </view>
  36 + </view>
  37 + </view>
  38 + </view>
  39 +
  40 + <!-- 提交 -->
  41 + <!-- <view v-if="have" class="submit-btn" @click="submitContent('valiForm')">
  42 + <text>发布</text>
  43 + </view> -->
  44 + <view class="submit-btn" @click="updateInfo('valiForm')">
  45 + <text>确定</text>
  46 + </view>
  47 + </view>
  48 +</template>
  49 +
  50 +<script>
  51 + import {
  52 + data
  53 + } from '../../../uview-ui/libs/mixin/mixin';
  54 + import request from '@/utils/request.js'
  55 + import utils from '../../../service/utils';
  56 + export default {
  57 + data() {
  58 + return {
  59 + userCode: {},
  60 + // 选择图片路径
  61 + filePath: [],
  62 + uploadPath: [],
  63 + type: "",
  64 + lastModifyUserId: '',
  65 + // 校验表单数据
  66 + valiFormData: {
  67 + title: '',
  68 + bodyContent: '',
  69 + subTitle: '',
  70 + },
  71 + // 通知信息标题
  72 + noticeTitle:'',
  73 + // 通知详情
  74 + noticeDesc:'',
  75 + creater: '',
  76 + rules: {
  77 + title: {
  78 + rules: [{
  79 + required: true,
  80 + errorMessage: '不能为空'
  81 + }]
  82 + },
  83 + subTitle: {
  84 + rules: [{
  85 + required: true,
  86 + errorMessage: '不能为空'
  87 + }]
  88 + },
  89 + },
  90 + baseUrl: "http://deyanggaoxin.fengshiyun.com",
  91 + // 判断是否传了id
  92 + isId: '',
  93 + have: false,
  94 + detailData: [],
  95 + // 需要通知的公司的id
  96 + companysId: [],
  97 + tellInfo:[],
  98 + TypeArray: ['已提交', '已处理', '忽略', '无效'],
  99 + TypeIndex: 0,
  100 + info:{}
  101 + };
  102 +
  103 + },
  104 + // onShow() {
  105 + // this.getType()
  106 + // },
  107 + onUnload() {
  108 + uni.$off('idInfo')
  109 + uni.$off('tellInfo')
  110 + },
  111 + onLoad(options) {
  112 + console.log("options", options)
  113 + uni.$on('idInfo', res => {
  114 + console.log("选择公司页面返回的公司ID", res)
  115 + if(res.length > 0)
  116 + this.companysId = res
  117 + })
  118 + uni.$on('tellInfo', res => {
  119 + console.log("tell信息", res)
  120 + if(res.length > 0)
  121 + this.tellInfo = res
  122 + })
  123 + if (JSON.stringify(options) == "{}") {
  124 + this.have = true
  125 + } else {
  126 + this.isId = JSON.parse(options.data)
  127 + console.log("Id", this.isId)
  128 + this.getConDetail(this.isId)
  129 + }
  130 + this.getUser()
  131 + let user = uni.getStorageSync('user')
  132 + this.lastModifyUserId = user.userInfo.userId
  133 +
  134 + },
  135 + methods: {
  136 + // 获取上传状态
  137 + select(e) {
  138 + console.log('选择文件:', e)
  139 + this.filePath = e.tempFilePaths
  140 + },
  141 + // 获取用户信息
  142 + getUser() {
  143 + if (uni.getStorageSync('user')) {
  144 + this.userCode = uni.getStorageSync('user').userInfo
  145 + // this.userInfo = this.userCode.userAccount
  146 + // this.userInfo = '123456'
  147 + console.log('用户已登录!', this.userCode)
  148 + } else {
  149 + uni.showToast({
  150 + title: '请登录',
  151 + icon: 'none'
  152 + })
  153 + setTimeout(() => {
  154 + uni.reLaunch({
  155 + url: '/pages/login/index'
  156 + })
  157 + })
  158 + }
  159 + },
  160 + // /**
  161 + // * 反馈类型
  162 + // * @param {Object}
  163 + // */
  164 + FeedbackTypeCh(val) {
  165 + console.log(val);
  166 + this.TypeIndex = val.detail.value;
  167 + },
  168 + // 获取信息
  169 + getConDetail(id) {
  170 + let that = this
  171 + let currentId = id
  172 + console.log(currentId)
  173 + request({
  174 + url:'/api/Extend/baseappealinformation/' + id,
  175 + method:'get',
  176 + data:{}
  177 + }).then(res=>{
  178 + if(res.code === 200){
  179 + console.log(res)
  180 + this.info = res.data
  181 + if(this.info.status !== null){
  182 + let index = this.TypeArray.findIndex(it=>it === this.info.status)
  183 + this.TypeIndex = index
  184 + console.log(index)
  185 + }
  186 + this.valiFormData.title = this.info.content
  187 + this.valiFormData.subTitle = this.info.plate
  188 + this.valiFormData.bodyContent = this.info.result
  189 + }
  190 + })
  191 + },
  192 + // 进行诉求处理
  193 + updateInfo(){
  194 + request({
  195 + url:'/api/Extend/baseappealinformation/' + this.isId,
  196 + method:'put',
  197 + data:{
  198 + content:this.info.content,
  199 + status:this.TypeArray[this.TypeIndex],
  200 + result:this.valiFormData.bodyContent,
  201 + plate:this.info.plate,
  202 + isShow:this.info.isShow,
  203 + type:this.info.type,
  204 + id:this.isId
  205 + }
  206 + }).then(res=>{
  207 + console.log("修改后",res)
  208 + if(res.code === 200){
  209 + uni.showToast({
  210 + icon:"success",
  211 + title:'已完成!',
  212 + duration:1500
  213 + })
  214 + uni.navigateBack({
  215 + delta:1
  216 + })
  217 + }
  218 + })
  219 + }
  220 + },
  221 + }
  222 +</script>
  223 +
  224 +<style scoped lang="scss">
  225 + @import 'Feedback.scss';
  226 +</style>
0 \ No newline at end of file 227 \ No newline at end of file
pages/fileLook/fileLook.vue
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 }); 88 });
89 }, 89 },
90 }); 90 });
91 - } 91 + },
92 } 92 }
93 } 93 }
94 </script> 94 </script>
pages/my/adminMessageList/adminMessageList.vue 0 → 100644
  1 +<template>
  2 + <view class="page">
  3 + <view class="list-box">
  4 + <view class="item" v-for="(it,index) in messageList" :key="index" @click="toDetail(it.MessageEntity,it.MessageReceiveEntity.MessageId)">
  5 + <view class="info">
  6 + <view class="title">
  7 + {{it.MessageEntity.Title}}
  8 + </view>
  9 + <view class="desc">
  10 + {{it.MessageEntity.BodyText}}
  11 + </view>
  12 + </view>
  13 + <view class="isRead" style="color: red;" v-if="it.MessageReceiveEntity.IsRead === 0">
  14 + 未读
  15 + </view>
  16 + <view class="isRead" style="color: greenyellow;" v-else>
  17 + 已读
  18 + </view>
  19 + </view>
  20 + </view>
  21 + </view>
  22 +</template>
  23 +
  24 +<script>
  25 + import request from '@/utils/request.js'
  26 + export default {
  27 + data() {
  28 + return {
  29 + messageList:[],
  30 + isAdmin:false
  31 + }
  32 + },
  33 + onShow() {
  34 + this.getUser()
  35 + this.getAdminNoticeTell()
  36 + },
  37 + onLoad() {
  38 + this.getUser()
  39 + this.getAdminNoticeTell()
  40 + },
  41 + methods: {
  42 + // 获取用户信息
  43 + getUser() {
  44 + if (uni.getStorageSync('user')) {
  45 + let userCode = uni.getStorageSync("user")
  46 + console.log(userCode)
  47 + if(userCode.userInfo.userId === 'admin'){
  48 + this.isAdmin = true
  49 + }
  50 + console.log('用户已登录!')
  51 + }
  52 + else {
  53 + uni.showToast({
  54 + title: '请登录',
  55 + icon: 'none',
  56 + duration:1500
  57 + })
  58 + // setTimeout(() => {
  59 + // uni.reLaunch({
  60 + // url: '/pages/login/index'
  61 + // })
  62 + // })
  63 + }
  64 + },
  65 + // 获取消息通知
  66 + getAdminNoticeTell(){
  67 + request({
  68 + url:'/api/extend/demo/GetMessageList',
  69 + method:'get',
  70 + data:{}
  71 + }).then(res=>{
  72 + console.log('通知列表',res)
  73 + if(res.code == 200){
  74 + this.messageList = JSON.parse(JSON.stringify(res.data))
  75 + }
  76 + })
  77 + },
  78 + // 跳转到消息详情
  79 + toDetail(it,id){
  80 + let link = JSON.parse(it.bodyJson)
  81 + // let id = it.Id
  82 + console.log('link',link.link)
  83 + // uni.navigateTo({
  84 + // url:link.link + `?data=${JSON.stringify(link.reid)}`
  85 + // })
  86 + // this.API.updateInfo({MessageId:id}).then(res=>{
  87 + // console.log("修改已读",res)
  88 + // if(res.code == 200){
  89 + // console.log('成功修改')
  90 + // uni.navigateTo({
  91 + // url:link.link + `?data=${JSON.stringify(link.reid)}`
  92 + // })
  93 + // }
  94 + // })
  95 + request({
  96 + url:`/api/extend/demo/UpdateIsReadEnd?MessageId=${id}`,
  97 + method:'put',
  98 + data:{}
  99 + }).then(res=>{
  100 + console.log("修改已读",res)
  101 + if(res.code == 200){
  102 + console.log('成功修改')
  103 + uni.navigateTo({
  104 + url:link.link + `?data=${JSON.stringify(link.reid)}`
  105 + })
  106 + }
  107 + })
  108 + }
  109 + }
  110 + }
  111 +</script>
  112 +
  113 +<style lang="scss" scoped>
  114 + .page{
  115 + width: 100%;
  116 + height: 100%;
  117 + background-color: #f3f3f3;
  118 + }
  119 + .list-box{
  120 + width: 96%;
  121 + margin: 0 auto;
  122 + overflow-y: scroll;
  123 + }
  124 + .item{
  125 + width: 100%;
  126 + background-color: white;
  127 + border-radius: 30rpx;
  128 + padding: 30rpx;
  129 + margin-top: 20rpx;
  130 + display: flex;
  131 + justify-content: space-between;
  132 + align-items: center;
  133 + .info{
  134 + display: flex;
  135 + flex-direction: column;
  136 + align-items: center;
  137 + .title{
  138 + font-size: 36rpx;
  139 + font-weight: bold;
  140 + }
  141 + .desc{
  142 + // width: 400rpx;
  143 + overflow: hidden;
  144 + white-space: nowrap;
  145 + text-overflow: ellipsis;
  146 + }
  147 + }
  148 + .isRead{
  149 + color: red;
  150 + margin-right: 40rpx;
  151 + }
  152 + }
  153 +</style>
pages/my/messageList/messageList.vue
1 <template> 1 <template>
2 <view class="page"> 2 <view class="page">
3 <view class="list-box"> 3 <view class="list-box">
4 - <view class="item" v-for="(it,index) in messageList" :key="index" @click="toDetail(it.MessageContent)"> 4 + <view class="item" v-for="(it,index) in messageList" :key="index" @click="toDetail(it.MessageContent,it.MessageInfo.MessageId)">
5 <view class="info"> 5 <view class="info">
6 <view class="title"> 6 <view class="title">
7 {{it.MessageContent.Title}} 7 {{it.MessageContent.Title}}
@@ -26,13 +26,38 @@ @@ -26,13 +26,38 @@
26 export default { 26 export default {
27 data() { 27 data() {
28 return { 28 return {
29 - messageList:[] 29 + messageList:[],
  30 + isAdmin:false
30 } 31 }
31 }, 32 },
32 onLoad() { 33 onLoad() {
  34 + this.getUser()
33 this.getNoticeTell() 35 this.getNoticeTell()
34 }, 36 },
35 methods: { 37 methods: {
  38 + // 获取用户信息
  39 + getUser() {
  40 + if (uni.getStorageSync('user')) {
  41 + let userCode = uni.getStorageSync("user")
  42 + console.log(userCode)
  43 + if(userCode.userInfo.userId === 'admin'){
  44 + this.isAdmin = true
  45 + }
  46 + console.log('用户已登录!')
  47 + }
  48 + else {
  49 + uni.showToast({
  50 + title: '请登录',
  51 + icon: 'none',
  52 + duration:1500
  53 + })
  54 + // setTimeout(() => {
  55 + // uni.reLaunch({
  56 + // url: '/pages/login/index'
  57 + // })
  58 + // })
  59 + }
  60 + },
36 // 获取消息通知 61 // 获取消息通知
37 getNoticeTell(){ 62 getNoticeTell(){
38 request({ 63 request({
@@ -46,27 +71,47 @@ @@ -46,27 +71,47 @@
46 } 71 }
47 }) 72 })
48 }, 73 },
  74 + // 获取消息通知
  75 + getAdminNoticeTell(){
  76 + request({
  77 + url:'/api/extend/demo/GetMessageList',
  78 + method:'get',
  79 + data:{}
  80 + }).then(res=>{
  81 + console.log('通知列表',res)
  82 + if(res.code == 200){
  83 + this.messageList = res.data
  84 + }
  85 + })
  86 + },
49 // 跳转到消息详情 87 // 跳转到消息详情
50 - toDetail(it){ 88 + toDetail(it,id){
51 let link = JSON.parse(it.bodyJson) 89 let link = JSON.parse(it.bodyJson)
52 - let id = it.Id 90 + // let id = it.Id
53 console.log('link',link.link) 91 console.log('link',link.link)
54 - uni.navigateTo({  
55 - url:link.link + `?data=${JSON.stringify(link.reid)}`  
56 - }) 92 + // uni.navigateTo({
  93 + // url:link.link + `?data=${JSON.stringify(link.reid)}`
  94 + // })
  95 + // this.API.updateInfo({MessageId:id}).then(res=>{
  96 + // console.log("修改已读",res)
  97 + // if(res.code == 200){
  98 + // console.log('成功修改')
  99 + // uni.navigateTo({
  100 + // url:link.link + `?data=${JSON.stringify(link.reid)}`
  101 + // })
  102 + // }
  103 + // })
57 request({ 104 request({
58 - url:'/api/extend/demo/UpdateIsReadEnd', 105 + url:`/api/extend/demo/UpdateIsReadEnd?MessageId=${id}`,
59 method:'put', 106 method:'put',
60 - data:{  
61 - MessageId:id  
62 - } 107 + data:{}
63 }).then(res=>{ 108 }).then(res=>{
64 console.log("修改已读",res) 109 console.log("修改已读",res)
65 if(res.code == 200){ 110 if(res.code == 200){
66 console.log('成功修改') 111 console.log('成功修改')
67 - // uni.navigateTo({  
68 - // url:link + `?data=${JSON.stringify(it.Id)}`  
69 - // }) 112 + uni.navigateTo({
  113 + url:link.link + `?data=${JSON.stringify(link.reid)}`
  114 + })
70 } 115 }
71 }) 116 })
72 } 117 }
pages/my/my.vue
@@ -258,7 +258,11 @@ @@ -258,7 +258,11 @@
258 this.getSelfDemandCount() 258 this.getSelfDemandCount()
259 this.getSelfZhaoCount() 259 this.getSelfZhaoCount()
260 this.getSelfCom() 260 this.getSelfCom()
261 - this.getNoticeTell() 261 + if(this.isAdmin){
  262 + this.getAdminNoticeTell()
  263 + }else{
  264 + this.getNoticeTell()
  265 + }
262 }, 266 },
263 onReady() { 267 onReady() {
264 uni.hideTabBar(); 268 uni.hideTabBar();
@@ -303,6 +307,19 @@ @@ -303,6 +307,19 @@
303 } 307 }
304 }) 308 })
305 }, 309 },
  310 + // 获取消息通知
  311 + getAdminNoticeTell(){
  312 + request({
  313 + url:'/api/extend/demo/GetMessageList',
  314 + method:'get',
  315 + data:{}
  316 + }).then(res=>{
  317 + console.log('通知列表',res)
  318 + if(res.code == 200){
  319 + this.message = res.data.length
  320 + }
  321 + })
  322 + },
306 // 跳转到个人信息页面 323 // 跳转到个人信息页面
307 toPerson(){ 324 toPerson(){
308 uni.navigateTo({ 325 uni.navigateTo({
@@ -327,9 +344,10 @@ @@ -327,9 +344,10 @@
327 url: '/pages/my/myZhao/myZhao' 344 url: '/pages/my/myZhao/myZhao'
328 }) 345 })
329 }, 346 },
  347 + // 跳转到用户诉求回复信息查看
330 toFileLook() { 348 toFileLook() {
331 uni.navigateTo({ 349 uni.navigateTo({
332 - url: '/pages/fileLook/fileLook' 350 + url: '/pages/my/userReponse/userReponse'
333 }) 351 })
334 }, 352 },
335 // 发布企业列表页面 353 // 发布企业列表页面
@@ -341,9 +359,16 @@ @@ -341,9 +359,16 @@
341 // 跳转到自己的消息列表 359 // 跳转到自己的消息列表
342 toMessage(){ 360 toMessage(){
343 console.log('111') 361 console.log('111')
344 - uni.navigateTo({  
345 - url:'/pages/my/messageList/messageList'  
346 - }) 362 + if(!this.isAdmin){
  363 + uni.navigateTo({
  364 + url:'/pages/my/messageList/messageList'
  365 + })
  366 + }else{
  367 + uni.navigateTo({
  368 + url:'/pages/my/adminMessageList/adminMessageList'
  369 + })
  370 + }
  371 +
347 }, 372 },
348 // 获取自己发布的产品 373 // 获取自己发布的产品
349 getSelfProCount() { 374 getSelfProCount() {
pages/my/myDemand/myDemand.vue
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 </view> 18 </view>
19 <view class="bottom"> 19 <view class="bottom">
20 <button type="primary" @click="GoodsDetails(it)">详情</button> 20 <button type="primary" @click="GoodsDetails(it)">详情</button>
21 - <button type="warn" @click="deleteDemand()(it.id)">删除</button> 21 + <button type="warn" @click="deleteDemand(it.id)">删除</button>
22 </view> 22 </view>
23 </view> 23 </view>
24 </view> 24 </view>
pages/my/userReponse/Feedback.scss 0 → 100644
  1 +.page{
  2 + position: absolute;
  3 + left: 0;
  4 + top: 0;
  5 + width: 100%;
  6 + height: 100%;
  7 + background-color: #f6f6f6;
  8 +}
  9 +.titleall-box {
  10 + display: flex;
  11 + justify-content: space-between;
  12 + padding: 40rpx 20rpx 20rpx 0;
  13 + .titleall-left {
  14 + font-size: 32rpx;
  15 + font-weight: bold;
  16 + display: flex;
  17 + align-items: center;
  18 + .titleall-left-line {
  19 + width: 14rpx;
  20 + height: 36rpx;
  21 + border-radius: 0 10rpx 10rpx 0;
  22 + background-color: #E60012;
  23 + box-shadow: 0 0 10rpx 5rpx #fbdadc;
  24 + margin-right: 20rpx;
  25 + }
  26 + text {
  27 + font-size: 28rpx;
  28 + color: #999999;
  29 + }
  30 + }
  31 +}
  32 +.item-box{
  33 + width: 96%;
  34 + margin: 0 auto;
  35 + margin-top: 20rpx;
  36 + border-radius: 30rpx;
  37 + background-color: white;
  38 + padding: 20rpx;
  39 + display: flex;
  40 + justify-content: space-between;
  41 + align-items: center;
  42 + .lef{
  43 + width: 60%;
  44 + // background-color: red;
  45 + overflow: hidden;
  46 + white-space: nowrap;
  47 + text-overflow: ellipsis;
  48 + }
  49 + .rig{
  50 + display: flex;
  51 + align-items: center;
  52 + .status{
  53 + font-size: 20rpx;
  54 + }
  55 + button{
  56 + margin-left: 20rpx;
  57 + font-size: 20rpx;
  58 + width: 150rpx;
  59 + background-color: dodgerblue;
  60 + color: white;
  61 + }
  62 + }
  63 +}
  64 +/* 反馈类型 */
  65 +.feedback-type{
  66 + position: relative;
  67 + display: flex;
  68 + align-items: center;
  69 + justify-content: space-between;
  70 + width: 94%;
  71 + height: 100rpx;
  72 + margin: 20rpx auto;
  73 + background-color: #FFFFFF;
  74 + border-radius: 20rpx;
  75 + padding: 0 4%;
  76 + .feedback-type-left {
  77 + color: #909090;
  78 + }
  79 + .title{
  80 + display: flex;
  81 + align-items: center;
  82 + text{
  83 + font-size: 26rpx;
  84 + }
  85 + }
  86 + .picker{
  87 + position: absolute;
  88 + width: 100%;
  89 + height: 100%;
  90 + opacity: 0;
  91 + }
  92 + .more{
  93 + display: flex;
  94 + align-items: center;
  95 + text{
  96 + color: #000;
  97 + font-size: 34rpx;
  98 + }
  99 + image {
  100 + width: 20rpx;
  101 + height: 20rpx;
  102 + margin-left: 10rpx;
  103 + }
  104 + }
  105 + .feedback-type-right {
  106 + display: flex;
  107 + align-items: center;
  108 + }
  109 +}
  110 +
  111 +/* 反馈内容 */
  112 +.feedback-data{
  113 + width: 94%;
  114 + height: 600rpx;
  115 + margin: 20rpx auto;
  116 + background-color: #FFFFFF;
  117 + border-radius: 20rpx;
  118 + .content{
  119 + padding: 20rpx;
  120 + textarea{
  121 + width: 94%;
  122 + height: 320rpx;
  123 + background-color: #f6f6f6;
  124 + border-radius: 20rpx;
  125 + padding: 20rpx;
  126 + font-size: 26rpx;
  127 + color: #222222;
  128 + }
  129 + }
  130 + .voucher-img{
  131 + display: flex;
  132 + align-items: center;
  133 + padding: 0 20rpx;
  134 + height: 240rpx;
  135 + margin-top: 20rpx;
  136 + .list{
  137 + width: 33%;
  138 + height: 100%;
  139 + image{
  140 + width: 160rpx;
  141 + height: 160rpx;
  142 + border-radius: 10rpx;
  143 + }
  144 + }
  145 + }
  146 +}
  147 +
  148 +/* 联系方式 */
  149 +.contact-way{
  150 + display: flex;
  151 + align-items: center;
  152 + justify-content: center;
  153 + width: 94%;
  154 + height: 100rpx;
  155 + margin: 20rpx auto;
  156 + background-color: #FFFFFF;
  157 + border-radius: 20rpx;
  158 + input{
  159 + width: 100%;
  160 + height: 100%;
  161 + padding: 0 4%;
  162 + font-size: 26rpx;
  163 + color: #222222;
  164 + }
  165 +}
  166 +
  167 +/* 提交 */
  168 +.submit-btn{
  169 + display: flex;
  170 + align-items: center;
  171 + justify-content: center;
  172 + width: 94%;
  173 + height: 80rpx;
  174 + margin: 30rpx auto;
  175 + background: #E60012;
  176 + border-radius: 80rpx;
  177 + text{
  178 + color: #FFFFFF;
  179 + font-size: 28rpx;
  180 + }
  181 +}
0 \ No newline at end of file 182 \ No newline at end of file
pages/my/userReponse/userReponse.vue 0 → 100644
  1 +<template>
  2 + <view class="page">
  3 + <view class="page" v-if="userCode === 'admin'">
  4 + <view class="item-box" v-for="(it,index) in appealList" :key="index" @click="toReponse(it.id)">
  5 + <view class="lef">
  6 + {{it.content}}
  7 + </view>
  8 + <view class="rig">
  9 + <view class="status" v-if="it.status == null" style="color: red;">
  10 + 未处理
  11 + </view>
  12 + <view class="status" v-else>
  13 + {{it.status}}
  14 + </view>
  15 + <view class="button">
  16 + <button >查看/处理</button>
  17 + </view>
  18 + </view>
  19 + </view>
  20 + </view>
  21 + </view>
  22 +</template>
  23 +
  24 +<script>
  25 + import request from '@/utils/request.js'
  26 + export default {
  27 + data() {
  28 + return {
  29 + TypeArray: ['行政审批', '生产运营', '金融服务', '其他'],
  30 + TypeIndex: 0,
  31 + // 填写诉求内容
  32 + requires:'',
  33 + type:"",
  34 + lastModifyUserId:'',
  35 + userCode:'',
  36 + list:[{
  37 + name: '未处理',
  38 + value: 0,
  39 + }, {
  40 + name: '已处理',
  41 + value: 1,
  42 + }, {
  43 + name: '忽略',
  44 + value: 2,
  45 + }, {
  46 + name: '无效',
  47 + value: 3,
  48 + }],
  49 + appealList:[],
  50 + isAdmin:false
  51 + }
  52 + },
  53 + onShow() {
  54 + this.getUser()
  55 + let user = uni.getStorageSync('user')
  56 + this.lastModifyUserId = user.userInfo.userId
  57 + if(this.isAdmin){
  58 + this.getAdminAppealList()
  59 + }else{
  60 + this.getAppealList()
  61 + }
  62 + },
  63 + // onLoad() {
  64 + // this.getUser()
  65 + // let user = uni.getStorageSync('user')
  66 + // this.lastModifyUserId = user.userInfo.userId
  67 + // if(this.isAdmin){
  68 + // this.getAdminAppealList()
  69 + // }else{
  70 + // this.getAppealList()
  71 + // }
  72 + // },
  73 + methods:{
  74 + // 获取用户信息
  75 + getUser(){
  76 + if (uni.getStorageSync('user')) {
  77 + let userCode = uni.getStorageSync('user').userInfo.userId
  78 + console.log('this.userCode',userCode)
  79 + this.userCode = userCode
  80 + if(this.userCode == 'admin'){
  81 + this.isAdmin = true
  82 + }
  83 + // this.userInfo = this.userCode.userAccount
  84 + // this.userInfo = '123456'
  85 + console.log('用户已登录!')
  86 + } else {
  87 + uni.showToast({
  88 + title: '请登录',
  89 + icon: 'none'
  90 + })
  91 + setTimeout(() => {
  92 + uni.reLaunch({
  93 + url: '/pages/login/index'
  94 + })
  95 + })
  96 + }
  97 + },
  98 + // 获取诉求列表
  99 + getAppealList(){
  100 + request({
  101 + url:'/api/Extend/baseappealinformation/GetListByCurrent',
  102 + method:'get',
  103 + data:{
  104 + pageSize:10000,
  105 + // status:status
  106 + }
  107 + }).then(res=>{
  108 + console.log(res)
  109 + if(res.code === 200){
  110 + this.appealList = res.data.list
  111 + }
  112 + })
  113 + },
  114 + // 获取诉求列表
  115 + getAdminAppealList(){
  116 + request({
  117 + url:'/api/Extend/baseappealinformation',
  118 + method:'get',
  119 + data:{
  120 + pageSize:10000,
  121 + // status:status
  122 + }
  123 + }).then(res=>{
  124 + console.log(res)
  125 + if(res.code === 200){
  126 + this.appealList = res.data.list
  127 + }
  128 + })
  129 + },
  130 + // 跳转到查看和修改页面
  131 + toReponse(id){
  132 + uni.navigateTo({
  133 + url:'/pages/Feedback/reponseAppeal/reponseAppeal?data=' + JSON.stringify(id)
  134 + })
  135 + },
  136 + }
  137 + }
  138 +</script>
  139 +
  140 +<style scoped lang="scss">
  141 + @import 'Feedback.scss';
  142 +</style>
pages/official/official.scss
@@ -23,4 +23,34 @@ @@ -23,4 +23,34 @@
23 color: #E60012; 23 color: #E60012;
24 font-weight: bold; 24 font-weight: bold;
25 } 25 }
26 -}  
27 \ No newline at end of file 26 \ No newline at end of file
  27 +}
  28 +.page1{
  29 + width: 100%;
  30 + height: 100vh;
  31 + background-color: #f4f4f4;
  32 + .fileName{
  33 + width: 400rpx;
  34 + white-space: nowrap;
  35 + text-overflow: ellipsis;
  36 + overflow: hidden;
  37 + }
  38 + .item {
  39 + display: flex;
  40 + justify-content: space-between;
  41 + align-items: center;
  42 + background-color: #ffffff;
  43 + border-radius: 20rpx;
  44 + height: 80rpx;
  45 + margin-top: 30rpx;
  46 +
  47 + button {
  48 + height: 60rpx;
  49 + text-align: center;
  50 + line-height: 60rpx;
  51 + margin: 0;
  52 + font-size: 20rpx;
  53 + margin-right: 30rpx;
  54 + }
  55 + }
  56 + }
  57 +
28 \ No newline at end of file 58 \ No newline at end of file
pages/official/official.vue
@@ -34,7 +34,21 @@ @@ -34,7 +34,21 @@
34 </view> 34 </view>
35 <!-- 企业用户看到的 --> 35 <!-- 企业用户看到的 -->
36 <view class="test" v-else> 36 <view class="test" v-else>
37 - 企业用户的消息列表 37 + <view class="page1">
  38 + <view class="" style="width: 96%;margin: 0 auto;overflow: hidden;" v-show="!isNull">
  39 + <view class="" style="width: 140rpx; margin: 0 auto;margin-top: 300rpx;font-size: 30rpx;">
  40 + 暂无信息
  41 + </view>
  42 + </view>
  43 + <view class="" style="width: 96%;margin: 0 auto;overflow: hidden;" v-show="isNull">
  44 + <view class="item" v-for="(it,index) in fileList" :key="index">
  45 + <view class="fileName" style="margin-left: 30rpx; ">
  46 + {{it.docmentName}}
  47 + </view>
  48 + <button @click="download(it.docmentUrl)">下载</button>
  49 + </view>
  50 + </view>
  51 + </view>
38 </view> 52 </view>
39 </view> 53 </view>
40 </template> 54 </template>
@@ -68,13 +82,20 @@ @@ -68,13 +82,20 @@
68 fileName: '文件名', 82 fileName: '文件名',
69 // 当前用户ID: 83 // 当前用户ID:
70 userId: '', 84 userId: '',
71 - isAdmin:false 85 + isAdmin:false,
  86 + // 用户公司ID
  87 + companyId: '',
  88 + // 公文列表
  89 + fileList: [],
  90 + isNull: false,
  91 + baseUrl: 'http://deyanggaoxin.fengshiyun.com'
72 } 92 }
73 }, 93 },
74 onShow() { 94 onShow() {
75 this.getUser() 95 this.getUser()
76 this.getTypeOfCompany() 96 this.getTypeOfCompany()
77 this.getTypeCompanyList('365139048618001669') 97 this.getTypeCompanyList('365139048618001669')
  98 + this.getFileList()
78 // this.getCompanyList() 99 // this.getCompanyList()
79 // this.getTypeOfCompany() 100 // this.getTypeOfCompany()
80 }, 101 },
@@ -353,7 +374,7 @@ @@ -353,7 +374,7 @@
353 console.log(res) 374 console.log(res)
354 if (res.code === 200) { 375 if (res.code === 200) {
355 if(this.check){ 376 if(this.check){
356 - this.tellNotice() 377 + this.tellNotice(res.data.Id,res.data.DocmentUrl)
357 } 378 }
358 uni.showToast({ 379 uni.showToast({
359 icon: "success", 380 icon: "success",
@@ -371,16 +392,19 @@ @@ -371,16 +392,19 @@
371 392
372 }, 393 },
373 // 进行通知 394 // 进行通知
374 - tellNotice(){ 395 + tellNotice(id,url){
375 // 进行通知 396 // 进行通知
  397 + console.log("进入通知")
376 request({ 398 request({
377 url:'/api/extend/demo/SendMessageByApp', 399 url:'/api/extend/demo/SendMessageByApp',
378 method:'post', 400 method:'post',
379 data:{ 401 data:{
380 title:'公文消息', 402 title:'公文消息',
381 - companys:'公文消息,请及时查看!', 403 + companys:this.city_ids5,
382 desc:this.noticeDesc, 404 desc:this.noticeDesc,
383 - fangshi:'通知' 405 + fangshi:'通知',
  406 + reid:id,
  407 + link:url
384 } 408 }
385 }).then(res=>{ 409 }).then(res=>{
386 console.log('通知结果',res) 410 console.log('通知结果',res)
@@ -402,11 +426,64 @@ @@ -402,11 +426,64 @@
402 }) 426 })
403 }) 427 })
404 return city_name.join(','); 428 return city_name.join(',');
405 - } 429 + },
  430 + // 获取当前用户的公文
  431 + getFileList() {
  432 + let userInfo = uni.getStorageSync('user')
  433 + request({
  434 + url: '/api/Extend/basedocumenthandle/GetListByCurrentUser',
  435 + method: 'get',
  436 + data: {}
  437 + }).then(res => {
  438 + console.log(res)
  439 + if (res.code === 200) {
  440 + this.fileList = res.data.list
  441 + if (this.fileList.length > 0) {
  442 + this.isNull = true
  443 + }
  444 + }
  445 + })
  446 + },
  447 + download(it) {
  448 + uni.downloadFile({
  449 + url: this.baseUrl + it,//下载地址接口返回
  450 + success: (data) => {
  451 + if (data.statusCode === 200) {
  452 + //文件保存到本地
  453 + uni.saveFile({
  454 + tempFilePath: data.tempFilePath, //临时路径
  455 + success: function(res) {
  456 + uni.showToast({
  457 + icon: 'none',
  458 + mask: true,
  459 + title: '文件已保存:' + res.savedFilePath, //保存路径
  460 + duration: 3000,
  461 + });
  462 + setTimeout(() => {
  463 + //打开文档查看
  464 + uni.openDocument({
  465 + filePath: res.savedFilePath,
  466 + success: function(res) {
  467 + // console.log('打开文档成功');
  468 + }
  469 + });
  470 + }, 3000)
  471 + }
  472 + });
  473 + }
  474 + },
  475 + fail: (err) => {
  476 + that.loadelshow = false
  477 + console.log(err);
  478 + uni.showToast({
  479 + icon: 'none',
  480 + mask: true,
  481 + title: '失败请重新下载',
  482 + });
  483 + },
  484 + });
  485 + },
406 }, 486 },
407 - created() {  
408 -  
409 - }  
410 } 487 }
411 </script> 488 </script>
412 489
pages/recommend/postRecommend/postRecommend.vue
@@ -59,6 +59,7 @@ @@ -59,6 +59,7 @@
59 </template> 59 </template>
60 60
61 <script> 61 <script>
  62 + import request from '@/utils/request.js'
62 export default { 63 export default {
63 data() { 64 data() {
64 return { 65 return {
@@ -212,7 +213,7 @@ @@ -212,7 +213,7 @@
212 companys:this.companysId, 213 companys:this.companysId,
213 desc:this.tellInfo[1], 214 desc:this.tellInfo[1],
214 reid:id, 215 reid:id,
215 - link:'/pages/conDetail/conDetail', 216 + link:'/pages/recommend/recommendInfo/recommendInfo',
216 fangshi:'通知' 217 fangshi:'通知'
217 } 218 }
218 }).then(res=>{ 219 }).then(res=>{
pages/recommend/recommendInfo/recommendInfo.vue
@@ -57,10 +57,10 @@ @@ -57,10 +57,10 @@
57 57
58 </view> 58 </view>
59 </view> 59 </view>
60 - <view class="buttons" v-show="isAdmin"> 60 + <!-- <view class="buttons" v-show="isAdmin">
61 <button type="primary" size="mini" @click="toUpdate(id)">修改</button> 61 <button type="primary" size="mini" @click="toUpdate(id)">修改</button>
62 <button type="warn" size="mini" @click="del(id)">删除</button> 62 <button type="warn" size="mini" @click="del(id)">删除</button>
63 - </view> 63 + </view> -->
64 </view> 64 </view>
65 </template> 65 </template>
66 66
uni_modules/zb-tab/changelog.md 0 → 100644
  1 +## 1.0.11(2023-10-15)
  2 +增加未选中样式 zb-no-active
  3 +## 1.0.10(2023-10-15)
  4 +优化说明文档
  5 +## 1.0.9(2023-10-15)
  6 +修复初始化问题
  7 +## 1.0.8(2023-05-22)
  8 +更新项目
  9 +## 1.0.7(2023-05-13)
  10 +兼容rpx
  11 +## 1.0.6(2023-05-13)
  12 +加个定时器
  13 +## 1.0.4(2023-05-07)
  14 +更新项目
  15 +## 1.0.3(2023-05-07)
  16 +修复vue3报错问题
  17 +## 1.0.2(2023-02-09)
  18 +增加说明文档使用
  19 +## 1.0.1(2023-01-30)
  20 +新增案例 和完善
  21 +## 1.0.0(2023-01-04)
  22 +发布初版
uni_modules/zb-tab/components/zb-tab/zb-tab.vue 0 → 100644
  1 +<template>
  2 + <view class="zb-tabs__nav zb-tabs__nav--line" :style="{
  3 + '--zb-tabs-height':tabHeight,
  4 + '--zb-tabs-line-width':lineTabWidth,
  5 + }">
  6 + <scroll-view :scroll-x="scrollable" :scroll-left="scrollLeft" :show-scrollbar="false" scroll-with-animation
  7 + class="zb-tabs__wrapper__scroll-view">
  8 + <view class="zb-tabs__nav_inner">
  9 + <view class="zb-tab" :class="[{
  10 + 'zb-tab--shrink':shrink,
  11 + 'zb-tab--active':activeIndex===index,
  12 + 'zb-no-active':activeIndex!==index,
  13 + 'zb-tab--disabled':item.disabled,
  14 + }]" ref="tab"
  15 + v-for="item,index in data" :key="item.value" @click="changeTab(item,index)">
  16 + <view class="zb-tab__text zb-tab__text--ellipsis"
  17 +
  18 + :style="[activeIndex===index&&activeStyle]">
  19 + {{ item.name }}
  20 + </view>
  21 + </view>
  22 + <view class="zb-tabs__line" :style="[lineStyle]"></view>
  23 + </view>
  24 + </scroll-view>
  25 + </view>
  26 +</template>
  27 +
  28 +<script>
  29 + export default {
  30 + options: {
  31 + // #ifdef MP-WEIXIN
  32 + // 微信小程序中 options 选项
  33 + multipleSlots: true, // 在组件定义时的选项中启动多slot支持,默认启用
  34 + styleIsolation: "shared", // 启动样式隔离。当使用页面自定义组件,希望父组件影响子组件样式时可能需要配置。具体配置选项参见:微信小程序自定义组件的样式
  35 + addGlobalClass: true, // 表示页面样式将影响到自定义组件,但自定义组件中指定的样式不会影响页面。这个选项等价于设置 styleIsolation: apply-shared
  36 + virtualHost: true, // 将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等,而是希望自定义组件内部的第一层节点能够响应 flex 布局或者样式由自定义组件本身完全决定
  37 + // #endif
  38 + },
  39 + props: {
  40 + // 开启收缩布局
  41 + shrink: {
  42 + type: Boolean,
  43 + default: false
  44 + },
  45 + height: {
  46 + type: [String, Number],
  47 + default: '40px'
  48 + },
  49 + // 底部条宽度,
  50 + lineWidth: {
  51 + type: [String, Number],
  52 + default: '40px'
  53 + },
  54 + lineColor: {
  55 + type: String,
  56 + default: '#ee0a24'
  57 + },
  58 + activeStyle: {
  59 + type: Object,
  60 + default: () => {}
  61 + },
  62 + value: {
  63 + type: [Number, String],
  64 + default: 0,
  65 + },
  66 + modelValue: {
  67 + type: [String, Number],
  68 + },
  69 + data: {
  70 + type: Array,
  71 + default: () => []
  72 + },
  73 + // 菜单是否可滚动
  74 + scrollable: {
  75 + type: Boolean,
  76 + default: true
  77 + }
  78 + },
  79 +
  80 + data() {
  81 + return {
  82 + scrollLeft: 0,
  83 + lineStyle: {},
  84 + inited: true,
  85 + initTime: null,
  86 + activeIndex: this.value,
  87 + valueTime:null,
  88 + dataTime:null,
  89 + }
  90 + },
  91 + computed: {
  92 + tabHeight() {
  93 + if (this.isNumeric(this.height)) {
  94 + return this.height + 'px'
  95 + }
  96 + if (this.height.includes('rpx')) {
  97 + let height = this.height.replace('rpx', '')
  98 + return uni.upx2px(height) + 'px';
  99 + }
  100 + return this.height
  101 + },
  102 + lineTabWidth() {
  103 + if (this.isNumeric(this.lineWidth)) {
  104 + return this.lineWidth + 'px'
  105 + }
  106 + if (this.lineWidth.includes('rpx')) {
  107 + let height = this.lineWidth.replace('rpx', '')
  108 + return uni.upx2px(this.lineWidth) + 'px';
  109 + }
  110 + return this.lineWidth
  111 + }
  112 + },
  113 + unmounted() {
  114 + this.initTime = null
  115 + },
  116 + mounted() {
  117 + this.setLine()
  118 + },
  119 + watch: {
  120 + data:{
  121 + handler(val,oldValue){
  122 + if(val&&val.length){
  123 + this.dataTime = setTimeout(()=>{
  124 + this.$nextTick(() => {
  125 + clearTimeout(this.dataTime)
  126 + let value = this.value
  127 + // #ifdef VUE3
  128 + value = this.modelValue
  129 + // #endif
  130 + if(value!=null){
  131 + this.setCurrentIndexByName(value);
  132 + }
  133 + this.setLine()
  134 + if(!this.valueTime){
  135 + let item = this.data.find(item => item.value === value)
  136 + this.$emit('change', {
  137 + ...item
  138 + });
  139 + }
  140 +
  141 + })
  142 + },1000/60)
  143 + }
  144 + },
  145 + immediate:true
  146 + },
  147 + // #ifndef VUE3
  148 + value: {
  149 + handler(val) {
  150 + if(this.data&&this.data.length){
  151 + this.valueTime = setTimeout(()=>{
  152 + this.setCurrentIndexByName(val);
  153 + this.$nextTick(() => {
  154 + this.setLine()
  155 + })
  156 + let item = this.data.find(item => item.value === val)
  157 + this.$emit('change', {
  158 + ...item
  159 + });
  160 + clearTimeout(this.valueTime)
  161 + },20)
  162 + }
  163 + },
  164 + immediate: true
  165 + },
  166 + // #endif
  167 +
  168 + // #ifdef VUE3
  169 + modelValue: {
  170 + handler(val) {
  171 + if (this.data&&this.data.length) {
  172 + this.valueTime = setTimeout(()=>{
  173 + this.setCurrentIndexByName(val);
  174 + this.$nextTick(() => {
  175 + this.setLine()
  176 + })
  177 + let item = this.data.find(item => item.value === val)
  178 + this.$emit('change', {
  179 + ...item
  180 + });
  181 + clearTimeout(this.valueTime)
  182 + },20)
  183 +
  184 + }
  185 +
  186 + },
  187 + immediate: true
  188 + },
  189 + // #endif
  190 + },
  191 + methods: {
  192 + isNumeric(val) {
  193 + return /^\d+(\.\d+)?$/.test(val);
  194 + },
  195 + addUnit(value) {
  196 + if (value == null) {
  197 + return undefined
  198 + }
  199 + value = String(value);
  200 + return this.isNumeric(value) ? `${value}px` : value;
  201 + },
  202 + setCurrentIndexByName(val) {
  203 + this.activeIndex = this.data.findIndex(item => item.value === val)
  204 + },
  205 +
  206 + async getWidth() {
  207 + return new Promise((resolve) => {
  208 + let view = uni.createSelectorQuery().in(this).selectAll(".zb-tab");
  209 + view.boundingClientRect(data => {
  210 + resolve(data)
  211 + }).exec();
  212 + })
  213 + },
  214 +
  215 + async getWrapWidth() {
  216 + return new Promise(resolve => {
  217 + let view = uni.createSelectorQuery().in(this).select(".zb-tabs__nav");
  218 + view.boundingClientRect(data => {
  219 + resolve(data)
  220 + }).exec();
  221 + })
  222 + },
  223 +
  224 + /**
  225 + * @ 滑动
  226 + * @param lineOffsetLeft 当前tab 距离左边的距离
  227 + * @param itemTab 当前tab滑块的位置
  228 + * @returns {Promise<void>}
  229 + */
  230 + async scrollLeftTo(lineOffsetLeft, itemTab) {
  231 + let tabNav = await this.getWrapWidth()
  232 + this.scrollLeft = lineOffsetLeft - (tabNav.width - itemTab.width) / 2
  233 +
  234 + },
  235 +
  236 + async setLine() {
  237 + let tabs = await this.getWidth()
  238 + let itemTab = tabs[this.activeIndex]
  239 + if (!itemTab) return
  240 +
  241 + // 获取滑块该移动的位置
  242 + let currentBeforeArr = tabs
  243 + .slice(0, this.activeIndex)
  244 +
  245 + let lineOffsetLeft = currentBeforeArr
  246 + .reduce((total, curr) => {
  247 + return total + curr.width
  248 + }, 0);
  249 + const left = lineOffsetLeft + itemTab.width / 2;
  250 + this.scrollLeftTo(lineOffsetLeft, itemTab)
  251 + const lineStyle = {
  252 + width: this.addUnit(this.lineWidth),
  253 + transform: `translateX(${left}px) translateX(-50%)`,
  254 + background: this.lineColor
  255 + };
  256 +
  257 + if (this.inited) {
  258 + lineStyle.transitionDuration = '0s'
  259 + if (this.inited) {
  260 + this.initTime = setTimeout(() => {
  261 + this.inited = false
  262 + }, 10);
  263 + }
  264 + }
  265 +
  266 + this.lineStyle = lineStyle;
  267 + },
  268 +
  269 + changeTab(item, index) {
  270 + if (item.disabled) return
  271 + this.activeIndex = index
  272 + this.setLine()
  273 + this.$emit('update:modelValue', item.value);
  274 + this.$emit('input', item.value);
  275 + this.$emit('click-tab', item)
  276 +
  277 + }
  278 + }
  279 + }
  280 +</script>
  281 +
  282 +<style lang="scss" scoped>
  283 + $zb-tabs-bottom-bar-color: var(--zb-tabs-bottom-bar-color);
  284 + $zb-tabs-height: var(--zb-tabs-height);
  285 + $zb-tabs-line-width: var(--zb-tabs-line-width);
  286 +
  287 + .zb-tabs__nav--line {
  288 + box-sizing: content-box;
  289 + height: 100%;
  290 + }
  291 +
  292 + .zb-tabs__nav_inner {
  293 + width: 100%;
  294 + height: 100%;
  295 + position: relative;
  296 + display: -webkit-box;
  297 + display: -webkit-flex;
  298 + display: flex;
  299 + background-color: #fff;
  300 + -webkit-user-select: none;
  301 + user-select: none;
  302 + }
  303 +
  304 + .zb-tabs__wrapper__scroll-view {
  305 + height: 100%;
  306 + width: 100%;
  307 + }
  308 +
  309 + .zb-tabs__nav {
  310 + width: 100%;
  311 + height: $zb-tabs-height;
  312 +
  313 + ::v-deep {
  314 + ::-webkit-scrollbar {
  315 + display: none;
  316 + width: 0 !important;
  317 + height: 0 !important;
  318 + -webkit-appearance: none;
  319 + background: transparent;
  320 + }
  321 + }
  322 + }
  323 +
  324 + .zb-tab {
  325 + position: relative;
  326 + display: -webkit-box;
  327 + display: -webkit-flex;
  328 + display: flex;
  329 + -webkit-box-flex: 1;
  330 + -webkit-flex: 1;
  331 + flex: 1;
  332 + -webkit-box-align: center;
  333 + -webkit-align-items: center;
  334 + align-items: center;
  335 + -webkit-box-pack: center;
  336 + -webkit-justify-content: center;
  337 + justify-content: center;
  338 + box-sizing: border-box;
  339 + padding: 0 4px;
  340 + color: #646566;
  341 + font-size: 14px;
  342 + line-height: 20px;
  343 + /* #ifdef H5 */
  344 + cursor: pointer;
  345 + /* #endif */
  346 +
  347 + }
  348 +
  349 + .zb-tab__text--ellipsis {
  350 + display: -webkit-box;
  351 + overflow: hidden;
  352 + -webkit-line-clamp: 1;
  353 + -webkit-box-orient: vertical;
  354 + }
  355 +
  356 + .zb-tab--active {
  357 + color: #323233;
  358 + font-weight: bold;
  359 +
  360 + }
  361 +
  362 + .zb-tabs__line {
  363 + position: absolute;
  364 + bottom: 2px;
  365 + left: 0;
  366 + z-index: 1;
  367 + width: $zb-tabs-line-width;
  368 + height: 3px;
  369 + background-color: $zb-tabs-bottom-bar-color;
  370 + border-radius: 3px;
  371 + transition-duration: 0.3s;
  372 + }
  373 +
  374 + .zb-tab--disabled {
  375 + cursor: not-allowed;
  376 +
  377 + .zb-tab__text {
  378 + color: #c8c9cc;
  379 + }
  380 + }
  381 +
  382 + .zb-tab--shrink {
  383 + flex: none;
  384 + padding: 0 8px;
  385 + }
  386 +</style>
0 \ No newline at end of file 387 \ No newline at end of file
uni_modules/zb-tab/package.json 0 → 100644
  1 +{
  2 + "id": "zb-tab",
  3 + "displayName": "zb-tab 多端兼容",
  4 + "version": "1.0.11",
  5 + "description": "Tab 标签页 选项卡组件,用于在不同的内容区域之间进行切换。",
  6 + "keywords": [
  7 + "zb-tab",
  8 + "tab",
  9 + "选项卡",
  10 + "标签页",
  11 + ""
  12 +],
  13 + "repository": "",
  14 + "engines": {
  15 + "HBuilderX": "^3.1.0"
  16 + },
  17 + "dcloudext": {
  18 + "type": "component-vue",
  19 + "sale": {
  20 + "regular": {
  21 + "price": "0.00"
  22 + },
  23 + "sourcecode": {
  24 + "price": "0.00"
  25 + }
  26 + },
  27 + "contact": {
  28 + "qq": ""
  29 + },
  30 + "declaration": {
  31 + "ads": "无",
  32 + "data": "无",
  33 + "permissions": "无"
  34 + },
  35 + "npmurl": ""
  36 + },
  37 + "uni_modules": {
  38 + "dependencies": [],
  39 + "encrypt": [],
  40 + "platforms": {
  41 + "cloud": {
  42 + "tcb": "y",
  43 + "aliyun": "y"
  44 + },
  45 + "client": {
  46 + "Vue": {
  47 + "vue2": "y",
  48 + "vue3": "y"
  49 + },
  50 + "App": {
  51 + "app-vue": "y",
  52 + "app-nvue": "u"
  53 + },
  54 + "H5-mobile": {
  55 + "Safari": "y",
  56 + "Android Browser": "y",
  57 + "微信浏览器(Android)": "y",
  58 + "QQ浏览器(Android)": "y"
  59 + },
  60 + "H5-pc": {
  61 + "Chrome": "y",
  62 + "IE": "y",
  63 + "Edge": "y",
  64 + "Firefox": "y",
  65 + "Safari": "y"
  66 + },
  67 + "小程序": {
  68 + "微信": "y",
  69 + "阿里": "y",
  70 + "百度": "y",
  71 + "字节跳动": "y",
  72 + "QQ": "y",
  73 + "钉钉": "y",
  74 + "快手": "y",
  75 + "飞书": "y",
  76 + "京东": "y"
  77 + },
  78 + "快应用": {
  79 + "华为": "y",
  80 + "联盟": "y"
  81 + }
  82 + }
  83 + }
  84 + }
  85 +}
0 \ No newline at end of file 86 \ No newline at end of file
uni_modules/zb-tab/readme.md 0 → 100644
  1 +# zb-tab tab 切换
  2 +
  3 +### 微信=》 19550102670 拉进群
  4 +
  5 +### 友情链接
  6 +#### 在线预览点击 —— [企业级、通用型中后台前端解决方案 ](https://yuanzbz.gitee.io/vue-admin-perfect/#/home)
  7 +#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案(基于vue3.0+TS+Element-Plus 最新版,同时支持电脑,手机,平板)](https://github.com/zouzhibin/vue-admin-perfect)
  8 +
  9 +
  10 +### zb-tab Props 属性
  11 +| 参数 | 说明 | 类型 | 默认值 | 是否必须 |
  12 +|-------------|--------------|---------------------------|----------|------|
  13 +| v-model | 绑定当前选中标签的标识符 | number , string] | 0 |非必须 |
  14 +| data | 数组对象 | Array | [] | 必须 |
  15 +| height | 设置tab高度 | string,number | 40px | -- |
  16 +| shrink | 是否开启左侧收缩布局 | boolean | false | 非必须 |
  17 +| lineWidth | 底部条宽度 | number , string | -- | - |
  18 +| lineColor | 底部条颜色 | string | #ee0a24 | - |
  19 +| activeStyle | 设置选中样式 | object | {} | - |
  20 +| scrollable | 菜单是否可以滚动 | boolean | true | - |
  21 +
  22 +### 特别注意
  23 +v-model v-model绑定的变量值与data绑定的数组内某一项元素的value值相等才能显示默认下划线。
  24 +对应的是 data中的 value值
  25 +
  26 +未选中class 可以用 zb-no-active 来覆盖样式
  27 +
  28 +##3 DropdownItem Events
  29 +| 参数 | 说明 | 回调参数 |
  30 +| ------ | ------ | ------ | ------ | ------ |------ |
  31 +| change | 选项改变导致 value 变化时触发 | item |
  32 +| click-tab | 点击选项改变导致 value 变化时触发 | item |
  33 +
  34 +
  35 +### 使用示例
  36 +```
  37 +<zb-tab
  38 + :activeStyle="{
  39 + fontWeight: 'bold',
  40 + transform: 'scale(1.1)'
  41 + }"
  42 + :data="list"
  43 + v-model="active"
  44 + ></zb-tab>
  45 +
  46 + v-model 对应得是 data中选中得value
  47 +```
  48 +### 数据格式
  49 +```
  50 +list0 = [{
  51 + name: '标签1',
  52 + value: 0,
  53 +}, {
  54 + name: '标签2',
  55 + value: 1,
  56 +}, {
  57 + name: '标签3',
  58 + value: 2,
  59 +}, {
  60 + name: '标签4',
  61 + value: 3,
  62 +}]
  63 +```
  64 +
  65 +
  66 +
0 \ No newline at end of file 67 \ No newline at end of file