Commit 73397f006a9c5b3b36d9543495bb1647d7c892d5

Authored by 郭伟龙
1 parent 27876a5a
Exists in develop and in 1 other branch charge

fix:0.1.0问题修复

@@ -14,6 +14,7 @@ export default { @@ -14,6 +14,7 @@ export default {
14 // #endif 14 // #endif
15 }, 15 },
16 onShow: function () { 16 onShow: function () {
  17 + this.$store.dispatch('loadDictDatas')
17 console.log('App Show') 18 console.log('App Show')
18 }, 19 },
19 onHide: function () { 20 onHide: function () {
1 const { http } = uni.$u 1 const { http } = uni.$u
2 2
3 // 查询全部字典数据列表 3 // 查询全部字典数据列表
4 -export const listSimpleDictDatas = params => http.get('/ticket/dict-data/list-all-simple', params) 4 +export const listSimpleDictDatas = params => http.get('/system/dict/type/getAllTypeData',params)
common/config.js
@@ -2,7 +2,8 @@ module.exports = { @@ -2,7 +2,8 @@ module.exports = {
2 //后端接口地址 2 //后端接口地址
3 // baseUrl: 'http://10.11.38.240:9001', //内网开发环境 3 // baseUrl: 'http://10.11.38.240:9001', //内网开发环境
4 baseUrl: 'http://172.17.56.37:18082/api', //测试环境 4 baseUrl: 'http://172.17.56.37:18082/api', //测试环境
5 - // baseUrl: 'http://172.17.56.16:18082/api', //正式环境 5 + // baseUrl: 'http://172.17.56.16:18082/api', //ip正式环境
  6 + // baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境
6 // baseUrl: 'http://api-dashboard.yudao.iocoder.cn/app-api', 7 // baseUrl: 'http://api-dashboard.yudao.iocoder.cn/app-api',
7 // 超时 8 // 超时
8 timeout: 30000, 9 timeout: 30000,
components/news-list/news-list.vue
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 {{newItem.title}} 6 {{newItem.title}}
7 </view> 7 </view>
8 <view class="bomCss overflow-one-lines"> 8 <view class="bomCss overflow-one-lines">
9 - <view class="overflow-one-lines" style="width: 130rpx;"> {{ $dict(newItem.plateName || "") }} </view> 9 + <view class="overflow-one-lines" style="width: 130rpx;"> {{ getDictDataLabel(DICT_TYPE.SYS_PLATE_NAME, newItem.plateName) || "" }} </view>
10 <view class="">|</view> 10 <view class="">|</view>
11 <view class="overflow-one-lines"> {{newItem.organizeName || ""}} </view> 11 <view class="overflow-one-lines"> {{newItem.organizeName || ""}} </view>
12 </view> 12 </view>
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
  4 + <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
4 <meta charset="UTF-8" /> 5 <meta charset="UTF-8" />
5 <script> 6 <script>
6 let coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || 7 let coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
@@ -8,16 +8,21 @@ import echarts from &#39;@/components/echarts-uniapp/echarts-uniapp.vue&#39;; @@ -8,16 +8,21 @@ import echarts from &#39;@/components/echarts-uniapp/echarts-uniapp.vue&#39;;
8 // vuex 8 // vuex
9 import store from './store' 9 import store from './store'
10 10
11 -import dict from '@/utils/dictionary.js'  
12 -import state from '@/utils/dictionary.js' 11 +import dayjs from 'dayjs'
  12 +
  13 +import {DICT_TYPE, getDictDataLabel, getDictDatas, getDictDatas2} from "./utils/dict";
13 14
14 15
15 // 将 dict 方法挂载到全局对象上 16 // 将 dict 方法挂载到全局对象上
16 17
17 Vue.config.productionTip = false 18 Vue.config.productionTip = false
18 Vue.prototype.$store = store 19 Vue.prototype.$store = store
19 -Vue.prototype.$state = state  
20 -Vue.prototype.$dict = dict 20 +
  21 +Vue.prototype.getDictDatas = getDictDatas
  22 +Vue.prototype.getDictDatas2 = getDictDatas2
  23 +Vue.prototype.getDictDataLabel = getDictDataLabel
  24 +Vue.prototype.$dayjs = dayjs
  25 +Vue.prototype.DICT_TYPE = DICT_TYPE
21 26
22 Vue.component('echarts',echarts) 27 Vue.component('echarts',echarts)
23 28
package-lock.json
1 { 1 {
2 - "name": "market-insight-app",  
3 - "lockfileVersion": 3, 2 + "name": "echarts for uniapp",
  3 + "version": "0.0.1",
  4 + "lockfileVersion": 1,
4 "requires": true, 5 "requires": true,
5 - "packages": {  
6 - "": {  
7 - "dependencies": {  
8 - "echarts": "^5.4.3"  
9 - }  
10 - },  
11 - "node_modules/tslib": {  
12 - "version": "2.3.0",  
13 - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",  
14 - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="  
15 - },  
16 - "node_modules/zrender": {  
17 - "version": "5.4.4",  
18 - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.4.tgz",  
19 - "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",  
20 - "dependencies": {  
21 - "tslib": "2.3.0"  
22 - } 6 + "dependencies": {
  7 + "dayjs": {
  8 + "version": "1.11.10",
  9 + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz",
  10 + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
23 } 11 }
24 } 12 }
25 } 13 }
@@ -12,5 +12,8 @@ @@ -12,5 +12,8 @@
12 "前端组件", 12 "前端组件",
13 "通用组件" 13 "通用组件"
14 ] 14 ]
  15 + },
  16 + "dependencies": {
  17 + "dayjs": "^1.11.10"
15 } 18 }
16 -}  
17 \ No newline at end of file 19 \ No newline at end of file
  20 +}
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 "color": "#8e8e8e", 55 "color": "#8e8e8e",
56 "list": [{ 56 "list": [{
57 "pagePath": "pages/market/index", 57 "pagePath": "pages/market/index",
58 - "text": "首页", 58 + "text": "市场资讯",
59 "iconPath": "/static/images/tabbar/message.png", 59 "iconPath": "/static/images/tabbar/message.png",
60 "selectedIconPath": "/static/images/tabbar/message-active.png" 60 "selectedIconPath": "/static/images/tabbar/message-active.png"
61 }, 61 },
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 "globalStyle": { 88 "globalStyle": {
89 "navigationStyle": "custom", 89 "navigationStyle": "custom",
90 "navigationBarTextStyle": "black", 90 "navigationBarTextStyle": "black",
91 - "navigationBarTitleText": "市场资讯", 91 + "navigationBarTitleText": "市场洞察",
92 "navigationBarBackgroundColor": "#ffffff", 92 "navigationBarBackgroundColor": "#ffffff",
93 "backgroundColor": "#ffffff" 93 "backgroundColor": "#ffffff"
94 } 94 }
pages/login/mobile.vue
@@ -20,15 +20,19 @@ @@ -20,15 +20,19 @@
20 <!-- 登录表单 --> 20 <!-- 登录表单 -->
21 <u--form labelPosition="left" :model="formData" :rules="rules" ref="form"> 21 <u--form labelPosition="left" :model="formData" :rules="rules" ref="form">
22 <u-form-item prop="username" ref="item-mobile"> 22 <u-form-item prop="username" ref="item-mobile">
23 - <u-input type="text" prefixIcon="account" maxlength="11" border="surround" shape="circle"  
24 - v-model="formData.username" clearable placeholder="请输入您的用户名"></u-input> 23 + <u-input type="text" maxlength="11" border="surround" shape="circle"
  24 + v-model="formData.username" clearable placeholder="请输入您的用户名" style="width: 610rpx;">
  25 + <u-icon slot="prefix" size="20" style="margin-right: 48rpx;" name="/static/images/icon/user.png"></u-icon>
  26 + <!-- <u--text text="http://" slot="prefix" margin="0 3px 0 0" type="tips"></u--text> -->
  27 + </u-input>
25 </u-form-item> 28 </u-form-item>
26 29
27 <u-gap height="20"></u-gap> 30 <u-gap height="20"></u-gap>
28 31
29 <u-form-item prop="password" ref="item-password"> 32 <u-form-item prop="password" ref="item-password">
30 <u-input :type="inputType" prefixIcon="lock" maxlength="16" border="surround" shape="circle" 33 <u-input :type="inputType" prefixIcon="lock" maxlength="16" border="surround" shape="circle"
31 - v-model="formData.password" placeholder="请输入登录密码"> 34 + v-model="formData.password" placeholder="请输入登录密码" style="width: 610rpx;">
  35 + <u-icon slot="prefix" size="20" style="margin-right: 48rpx;" name="/static/images/icon/pwd.png"></u-icon>
32 <template slot="suffix"> 36 <template slot="suffix">
33 <u-icon v-if="inputType === 'password'" size="20" color="#666666" name="eye-fill" 37 <u-icon v-if="inputType === 'password'" size="20" color="#666666" name="eye-fill"
34 @click="inputType = 'text'"></u-icon> 38 @click="inputType = 'text'"></u-icon>
@@ -39,7 +43,7 @@ @@ -39,7 +43,7 @@
39 </u-form-item> 43 </u-form-item>
40 44
41 <view class="btn-group"> 45 <view class="btn-group">
42 - <u-button class="auth-btn" customStyle="margin-top: 50px" @click="handleSubmit">登录</u-button> 46 + <u-button class="auth-btn" customStyle="margin-top: 50px" @click="handleSubmit">登录</u-button>
43 </view> 47 </view>
44 </u--form> 48 </u--form>
45 </view> 49 </view>
@@ -59,8 +63,8 @@ @@ -59,8 +63,8 @@
59 codeDisabled: false, 63 codeDisabled: false,
60 codeTips: '', 64 codeTips: '',
61 formData: { 65 formData: {
62 - username: '',  
63 - password: '', 66 + username: 'xucfa',
  67 + password: 'admin123',
64 }, 68 },
65 rules: { 69 rules: {
66 username: { 70 username: {
@@ -122,6 +126,9 @@ @@ -122,6 +126,9 @@
122 </script> 126 </script>
123 127
124 <style lang="scss" scoped> 128 <style lang="scss" scoped>
  129 + .containers{
  130 + max-width: 750rpx;
  131 + }
125 .auth-header { 132 .auth-header {
126 height: 600rpx; 133 height: 600rpx;
127 display: flex; 134 display: flex;
@@ -172,7 +179,7 @@ @@ -172,7 +179,7 @@
172 } 179 }
173 180
174 .btn-group { 181 .btn-group {
175 - width: 600rpx; 182 + width: 642rpx;
176 183
177 .auth-btn { 184 .auth-btn {
178 height: 90rpx; 185 height: 90rpx;
@@ -190,7 +197,7 @@ @@ -190,7 +197,7 @@
190 } 197 }
191 198
192 .u-input { 199 .u-input {
193 - height: 54rpx; 200 + height: 60rpx;
194 background: #f5f7f7; 201 background: #f5f7f7;
195 } 202 }
196 </style> 203 </style>
pages/market/index.vue
@@ -3,18 +3,18 @@ @@ -3,18 +3,18 @@
3 <u-sticky bgColor="#fff" customNavHeight="0" offsetTop="0"> 3 <u-sticky bgColor="#fff" customNavHeight="0" offsetTop="0">
4 <view class="flexCss"> 4 <view class="flexCss">
5 <view class="leftCss"> 5 <view class="leftCss">
6 - <u-icon size="15" name="/static/images/empty/login-out.png"></u-icon> 6 + <u-icon size="15" name="/static/images/icon/login-out.png"></u-icon>
7 <view class="loginOutCss" @click="loginOutMethod"> 7 <view class="loginOutCss" @click="loginOutMethod">
8 退出登录 8 退出登录
9 </view> 9 </view>
10 </view> 10 </view>
11 <u-search placeholder="搜索感兴趣的内容" v-model="keyword" :show-action="false" margin="30rpx 34rpx 15rpx 34rpx" 11 <u-search placeholder="搜索感兴趣的内容" v-model="keyword" :show-action="false" margin="30rpx 34rpx 15rpx 34rpx"
12 - borderColor="rgb(230, 230, 230)" height="74rpx" bgColor="#F5F6FA" @search="search"></u-search> 12 + borderColor="rgb(230, 230, 230)" height="74rpx" bgColor="#F5F6FA" @clear="clearInit" @search="search"></u-search>
13 </view> 13 </view>
14 <u-tabs :list="tabList" :activeStyle="{'color': '#cf000d','font-weight':'bold'}" lineWidth="30rpx" 14 <u-tabs :list="tabList" :activeStyle="{'color': '#cf000d','font-weight':'bold'}" lineWidth="30rpx"
15 lineHeight="4rpx" lineColor="#cf000d" :current="current" @click="tabChange"></u-tabs> 15 lineHeight="4rpx" lineColor="#cf000d" :current="current" @click="tabChange"></u-tabs>
16 </u-sticky> 16 </u-sticky>
17 - <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="NewsList.length <= 0"></u-empty> 17 + <u-empty text="暂无资讯" icon="/static/images/icon/nodata.png" v-if="NewsList.length <= 0"></u-empty>
18 <newsList v-for="(item,index) in NewsList" :key="index" :newItem="item" v-else></newsList> 18 <newsList v-for="(item,index) in NewsList" :key="index" :newItem="item" v-else></newsList>
19 <u-loadmore :status="status" v-if="NewsList.length > 0" /> 19 <u-loadmore :status="status" v-if="NewsList.length > 0" />
20 <u-modal :show="loginOutShow" title="退出登录" showCancelButton confirmColor="red" @cancel="loginOutShow = false" 20 <u-modal :show="loginOutShow" title="退出登录" showCancelButton confirmColor="red" @cancel="loginOutShow = false"
@@ -49,7 +49,10 @@ @@ -49,7 +49,10 @@
49 total: null, 49 total: null,
50 queryParameter: { 50 queryParameter: {
51 pageNum: 1, 51 pageNum: 1,
52 - pageSize: 10 52 + pageSize: 10,
  53 + publishStatusList:1,
  54 + roleId:this.$store.state.user.roleId,
  55 + organizeId:this.$store.state.user.entity,
53 }, 56 },
54 tabList: [{ 57 tabList: [{
55 name: "全部", 58 name: "全部",
@@ -76,6 +79,7 @@ @@ -76,6 +79,7 @@
76 }, 79 },
77 onLoad() { 80 onLoad() {
78 this.initData() 81 this.initData()
  82 + console.log(this.$store.state.user);
79 }, 83 },
80 onReachBottom() { 84 onReachBottom() {
81 let allTotal = this.queryParameter.pageNum * this.queryParameter.pageSize 85 let allTotal = this.queryParameter.pageNum * this.queryParameter.pageSize
@@ -105,15 +109,17 @@ @@ -105,15 +109,17 @@
105 }, 109 },
106 resetQuery() { 110 resetQuery() {
107 this.NewsList = []; 111 this.NewsList = [];
108 - this.queryParameter = {  
109 - pageNum: 1,  
110 - pageSize: 10  
111 - } 112 + this.queryParameter.pageNum = 1;
  113 + this.queryParameter.pageSize = 10;
112 }, 114 },
113 search() { 115 search() {
114 this.resetQuery(); 116 this.resetQuery();
115 this.updateList() 117 this.updateList()
116 }, 118 },
  119 + clearInit(){
  120 + this.keyword = ""
  121 + this.search()
  122 + },
117 checkTotal() { 123 checkTotal() {
118 let allTotal = this.queryParameter.pageNum * this.queryParameter.pageSize 124 let allTotal = this.queryParameter.pageNum * this.queryParameter.pageSize
119 if (this.total < allTotal) { 125 if (this.total < allTotal) {
@@ -121,26 +127,18 @@ @@ -121,26 +127,18 @@
121 } 127 }
122 }, 128 },
123 updateList() { 129 updateList() {
124 - let Params  
125 - if (this.keyword && this.current !== -1) {  
126 - Params = {  
127 - title: this.keyword,  
128 - plateName: this.current  
129 - }  
130 - } else if (this.keyword !== "") {  
131 - Params = {  
132 - title: this.keyword,  
133 - }  
134 - } else if (this.current !== 0) {  
135 - Params = {  
136 - plateName: this.current - 1  
137 - } 130 + let Params = {};
  131 + if(this.keyword){
  132 + Params.title = this.keyword
  133 + }
  134 + if(this.current !== -1 && this.current !== 0){
  135 + Params.plateNameList = this.current - 1
138 } 136 }
139 Params = { 137 Params = {
140 ...this.queryParameter, 138 ...this.queryParameter,
141 ...Params 139 ...Params
142 }; 140 };
143 - // console.log(111111, Params); 141 + console.log(111111, Params);
144 getInfoMarketInformationlist(Params).then(res => { 142 getInfoMarketInformationlist(Params).then(res => {
145 // console.log(res); 143 // console.log(res);
146 if (res.code === 200) { 144 if (res.code === 200) {
pages/market/insight.vue
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 </u-sticky> 42 </u-sticky>
43 <view class="listBodyCss"> 43 <view class="listBodyCss">
44 <view class="" v-if="!current"> 44 <view class="" v-if="!current">
45 - <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="newList1.length <= 0"></u-empty> 45 + <u-empty text="暂无报告" icon="/static/images/icon/nodata.png" v-if="newList1.length <= 0"></u-empty>
46 <view class="reportCss" v-for="(item,index) in newList1" :key="index"> 46 <view class="reportCss" v-for="(item,index) in newList1" :key="index">
47 <view class="topTitleCss"> 47 <view class="topTitleCss">
48 <view class="top1 overflow-one-lines"> {{item.reportName || ""}} </view> 48 <view class="top1 overflow-one-lines"> {{item.reportName || ""}} </view>
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <u-loadmore :status="status1" v-if="newList1.length > 0" /> 63 <u-loadmore :status="status1" v-if="newList1.length > 0" />
64 </view> 64 </view>
65 <view v-else> 65 <view v-else>
66 - <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="newList2.length <= 0"></u-empty> 66 + <u-empty text="暂无内容" icon="/static/images/icon/nodata.png" v-if="newList2.length <= 0"></u-empty>
67 <view class="reportCss" @click="jumpUserDetails(item)" :style="'height:auto'" v-else 67 <view class="reportCss" @click="jumpUserDetails(item)" :style="'height:auto'" v-else
68 v-for="(item,index) in newList2" :key="index"> 68 v-for="(item,index) in newList2" :key="index">
69 <view class="topTitleCss"> 69 <view class="topTitleCss">
@@ -115,7 +115,9 @@ @@ -115,7 +115,9 @@
115 total2: null, 115 total2: null,
116 queryParameter: { 116 queryParameter: {
117 pageNum: 1, 117 pageNum: 1,
118 - pageSize: 10 118 + pageSize: 10,
  119 + roleId:this.$store.state.user.roleId,
  120 + entity:this.$store.state.user.entity,
119 }, 121 },
120 tabList1: [{ 122 tabList1: [{
121 name: '全部' 123 name: '全部'
@@ -223,7 +225,7 @@ @@ -223,7 +225,7 @@
223 fiscalYear: this.fiscalYear 225 fiscalYear: this.fiscalYear
224 } 226 }
225 } 227 }
226 - console.log(Params); 228 + console.log("市场摸底查询参数",Params);
227 Params = { 229 Params = {
228 ...this.queryParameter, 230 ...this.queryParameter,
229 ...Params 231 ...Params
@@ -242,14 +244,12 @@ @@ -242,14 +244,12 @@
242 }) 244 })
243 }, 245 },
244 updateList2() { 246 updateList2() {
245 - let Params 247 + let Params = {};
246 if (this.current2 === 0) { 248 if (this.current2 === 0) {
247 if (this.keyword) { 249 if (this.keyword) {
248 - Params = {  
249 - householdName: this.keyword,  
250 - } 250 + Params.householdName = this.keyword
251 } 251 }
252 - getPoolResidentlist(Params).then(res => { 252 + getPoolResidentlist({...Params,...this.queryParameter}).then(res => {
253 // console.log(res); 253 // console.log(res);
254 if (res.code === 200) { 254 if (res.code === 200) {
255 if (this.queryParameter.pageSize > 1) { 255 if (this.queryParameter.pageSize > 1) {
@@ -262,11 +262,9 @@ @@ -262,11 +262,9 @@
262 }) 262 })
263 } else if (this.current2 === 1) { 263 } else if (this.current2 === 1) {
264 if (this.keyword) { 264 if (this.keyword) {
265 - Params = {  
266 - householdName: this.keyword,  
267 - } 265 + Params.householdName = this.keyword
268 } 266 }
269 - getPoolCommercelist(Params).then(res => { 267 + getPoolCommercelist({...Params,...this.queryParameter}).then(res => {
270 // console.log(res); 268 // console.log(res);
271 if (res.code === 200) { 269 if (res.code === 200) {
272 if (this.queryParameter.pageSize > 1) { 270 if (this.queryParameter.pageSize > 1) {
@@ -279,11 +277,9 @@ @@ -279,11 +277,9 @@
279 }) 277 })
280 } else if (this.current2 === 2) { 278 } else if (this.current2 === 2) {
281 if (this.keyword) { 279 if (this.keyword) {
282 - Params = {  
283 - contactPerson: this.keyword,  
284 - } 280 + Params.contactPerson = this.keyword
285 } 281 }
286 - getPoolIndustrylist(Params).then(res => { 282 + getPoolIndustrylist({...Params,...this.queryParameter}).then(res => {
287 // console.log(res); 283 // console.log(res);
288 if (res.code === 200) { 284 if (res.code === 200) {
289 if (this.queryParameter.pageSize > 1) { 285 if (this.queryParameter.pageSize > 1) {
@@ -294,8 +290,6 @@ @@ -294,8 +290,6 @@
294 this.total2 = res.total; 290 this.total2 = res.total;
295 } 291 }
296 }) 292 })
297 - } else {  
298 -  
299 } 293 }
300 this.checkTotal() 294 this.checkTotal()
301 console.log("待开发", this.newList2); 295 console.log("待开发", this.newList2);
@@ -312,10 +306,8 @@ @@ -312,10 +306,8 @@
312 resetQuery() { 306 resetQuery() {
313 this.newList1 = []; 307 this.newList1 = [];
314 this.newList2 = []; 308 this.newList2 = [];
315 - this.queryParameter = {  
316 - pageNum: 1,  
317 - pageSize: 10  
318 - } 309 + this.queryParameter.pageNum = 1;
  310 + this.queryParameter.pageSize = 10;
319 }, 311 },
320 tabChange1(e) { 312 tabChange1(e) {
321 console.log(e); 313 console.log(e);
pages/market/userDetails.vue
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 </view> 47 </view>
48 <view class="flexCss"> 48 <view class="flexCss">
49 <view class="leftCss overflow-one-lines"> 房主年龄 </view> 49 <view class="leftCss overflow-one-lines"> 房主年龄 </view>
50 - <view class="rightCss overflow-one-lines"> {{allData.householdAge}} </view> 50 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSEHOLD_AGE, allData.householdAge) || "" }} </view>
51 </view> 51 </view>
52 <view class="flexCss"> 52 <view class="flexCss">
53 <view class="leftCss overflow-one-lines"> 联系电话 </view> 53 <view class="leftCss overflow-one-lines"> 联系电话 </view>
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 </view> 86 </view>
87 <view class="flexCss"> 87 <view class="flexCss">
88 <view class="leftCss overflow-one-lines"> 经营业主年龄 </view> 88 <view class="leftCss overflow-one-lines"> 经营业主年龄 </view>
89 - <view class="rightCss overflow-one-lines"> {{allData.householdAge}} </view> 89 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSEHOLD_AGE, allData.householdAge) || "" }} </view>
90 </view> 90 </view>
91 <view class="flexCss"> 91 <view class="flexCss">
92 <view class="leftCss overflow-one-lines"> 联系电话 </view> 92 <view class="leftCss overflow-one-lines"> 联系电话 </view>
@@ -117,7 +117,7 @@ @@ -117,7 +117,7 @@
117 </view> 117 </view>
118 <view class="flexCss"> 118 <view class="flexCss">
119 <view class="leftCss overflow-one-lines"> 职务 </view> 119 <view class="leftCss overflow-one-lines"> 职务 </view>
120 - <view class="rightCss overflow-one-lines"> {{allData.duties}} </view> 120 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_INDUSTRY_DUTIES, allData.duties) || "" }} </view>
121 </view> 121 </view>
122 <view class="flexCss"> 122 <view class="flexCss">
123 <view class="leftCss overflow-one-lines"> 电话 </view> 123 <view class="leftCss overflow-one-lines"> 电话 </view>
@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
138 <view class="" v-if="type == 0"> 138 <view class="" v-if="type == 0">
139 <view class="flexCss"> 139 <view class="flexCss">
140 <view class="leftCss overflow-one-lines"> 居住人口 </view> 140 <view class="leftCss overflow-one-lines"> 居住人口 </view>
141 - <view class="rightCss overflow-one-lines"> {{allData.resideNumber}} </view> 141 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_LIVE_NO, allData.resideNumber) || "" }} </view>
142 </view> 142 </view>
143 <view class="flexCss"> 143 <view class="flexCss">
144 <view class="leftCss overflow-one-lines"> 房屋户型 </view> 144 <view class="leftCss overflow-one-lines"> 房屋户型 </view>
@@ -150,55 +150,55 @@ @@ -150,55 +150,55 @@
150 </view> 150 </view>
151 <view class="flexCss"> 151 <view class="flexCss">
152 <view class="leftCss overflow-one-lines"> 房屋建设年限 </view> 152 <view class="leftCss overflow-one-lines"> 房屋建设年限 </view>
153 - <view class="rightCss overflow-one-lines"> {{allData.houseYear}} </view> 153 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_BUILD_YEAR, allData.houseYear) || "" }} </view>
154 </view> 154 </view>
155 <view class="flexCss"> 155 <view class="flexCss">
156 <view class="leftCss overflow-one-lines"> 房屋居住性质 </view> 156 <view class="leftCss overflow-one-lines"> 房屋居住性质 </view>
157 - <view class="rightCss overflow-one-lines"> {{allData.houseNature}} </view> 157 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSE_NATURE, allData.houseNature) || "" }} </view>
158 </view> 158 </view>
159 <view class="flexCss"> 159 <view class="flexCss">
160 <view class="leftCss overflow-one-lines"> 居住属性 </view> 160 <view class="leftCss overflow-one-lines"> 居住属性 </view>
161 - <view class="rightCss overflow-one-lines"> {{allData.resideAttribute}} </view> 161 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_LIVE_ATTRIBUTE, allData.resideAttribute) || "" }} </view>
162 </view> 162 </view>
163 <view class="flexCss"> 163 <view class="flexCss">
164 <view class="leftCss overflow-one-lines"> 房屋性质 </view> 164 <view class="leftCss overflow-one-lines"> 房屋性质 </view>
165 - <view class="rightCss overflow-one-lines"> {{allData.houseAttribute}} </view> 165 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSE_ATTRIBUTE, allData.houseAttribute) || "" }} </view>
166 </view> 166 </view>
167 <view class="flexCss"> 167 <view class="flexCss">
168 <view class="leftCss overflow-one-lines"> 房屋结构类型 </view> 168 <view class="leftCss overflow-one-lines"> 房屋结构类型 </view>
169 - <view class="rightCss overflow-one-lines"> {{allData.houseStructure}} </view> 169 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSE_STRUCTURE, allData.houseStructure) || "" }} </view>
170 </view> 170 </view>
171 <view class="flexCss"> 171 <view class="flexCss">
172 <view class="leftCss overflow-one-lines"> 所在房屋距离中压管道 </view> 172 <view class="leftCss overflow-one-lines"> 所在房屋距离中压管道 </view>
173 - <view class="rightCss overflow-one-lines"> {{allData.distance}} </view> 173 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_DISTANCE, allData.distance) || "" }} </view>
174 </view> 174 </view>
175 <view class="flexCss"> 175 <view class="flexCss">
176 <view class="leftCss overflow-one-lines"> 所在房屋是否有物业 </view> 176 <view class="leftCss overflow-one-lines"> 所在房屋是否有物业 </view>
177 - <view class="rightCss overflow-one-lines"> {{allData.isExist}} </view> 177 + <view class="rightCss overflow-one-lines"> {{allData.isExist?'是':'否'}} </view>
178 </view> 178 </view>
179 <view class="flexCss"> 179 <view class="flexCss">
180 <view class="leftCss overflow-one-lines"> 房屋是否列入拆迁规划 </view> 180 <view class="leftCss overflow-one-lines"> 房屋是否列入拆迁规划 </view>
181 - <view class="rightCss overflow-one-lines"> {{allData.isPlan}} </view> 181 + <view class="rightCss overflow-one-lines"> {{allData.isPlan?'是':'否'}} </view>
182 </view> 182 </view>
183 <view class="flexCss"> 183 <view class="flexCss">
184 <view class="leftCss overflow-one-lines"> 水/电表是否一户一表 </view> 184 <view class="leftCss overflow-one-lines"> 水/电表是否一户一表 </view>
185 - <view class="rightCss overflow-one-lines"> {{allData.isSingleMeter}} </view> 185 + <view class="rightCss overflow-one-lines"> {{allData.isSingleMeter?'是':'否'}} </view>
186 </view> 186 </view>
187 <view class="flexCss"> 187 <view class="flexCss">
188 <view class="leftCss overflow-one-lines"> 是否独立厨房 </view> 188 <view class="leftCss overflow-one-lines"> 是否独立厨房 </view>
189 - <view class="rightCss overflow-one-lines"> {{allData.isSingleKitchen}} </view> 189 + <view class="rightCss overflow-one-lines"> {{allData.isSingleKitchen?'是':'否'}} </view>
190 </view> 190 </view>
191 <view class="flexCss"> 191 <view class="flexCss">
192 <view class="leftCss overflow-one-lines"> 是否集中供暖 </view> 192 <view class="leftCss overflow-one-lines"> 是否集中供暖 </view>
193 - <view class="rightCss overflow-one-lines"> {{allData.isHeating}} </view> 193 + <view class="rightCss overflow-one-lines"> {{allData.isHeating?'是':'否'}} </view>
194 </view> 194 </view>
195 <view class="flexCss"> 195 <view class="flexCss">
196 <view class="leftCss overflow-one-lines"> 楼前立管是否安装 </view> 196 <view class="leftCss overflow-one-lines"> 楼前立管是否安装 </view>
197 - <view class="rightCss overflow-one-lines"> {{allData.isInstall}} </view> 197 + <view class="rightCss overflow-one-lines"> {{allData.isInstall?'是':'否'}} </view>
198 </view> 198 </view>
199 <view class="flexCss"> 199 <view class="flexCss">
200 <view class="leftCss overflow-one-lines"> 现使用能源 </view> 200 <view class="leftCss overflow-one-lines"> 现使用能源 </view>
201 - <view class="rightCss overflow-one-lines"> {{allData.currentEnergy}} </view> 201 + <view class="rightCss overflow-one-lines"> {{allData.currentEnergy?'是':'否'}} </view>
202 </view> 202 </view>
203 <view class="flexCss"> 203 <view class="flexCss">
204 <view class="leftCss overflow-one-lines"> 现使用能源价格(元) </view> 204 <view class="leftCss overflow-one-lines"> 现使用能源价格(元) </view>
@@ -206,7 +206,7 @@ @@ -206,7 +206,7 @@
206 </view> 206 </view>
207 <view class="flexCss"> 207 <view class="flexCss">
208 <view class="leftCss overflow-one-lines"> 用户报装意愿 </view> 208 <view class="leftCss overflow-one-lines"> 用户报装意愿 </view>
209 - <view class="rightCss overflow-one-lines"> {{allData.inclinate}} </view> 209 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_INSTALL_INCLINATE, allData.inclinate) || "" }} </view>
210 </view> 210 </view>
211 <view class="flexCss"> 211 <view class="flexCss">
212 <view class="leftCss overflow-one-lines"> 不报装原因 </view> 212 <view class="leftCss overflow-one-lines"> 不报装原因 </view>
@@ -225,43 +225,43 @@ @@ -225,43 +225,43 @@
225 </view> 225 </view>
226 <view class="flexCss"> 226 <view class="flexCss">
227 <view class="leftCss overflow-one-lines"> 经营范围 </view> 227 <view class="leftCss overflow-one-lines"> 经营范围 </view>
228 - <view class="rightCss overflow-one-lines"> {{allData.businessScope}} </view> 228 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_BUSINESS_SCOPE, allData.businessScope) || "" }} </view>
229 </view> 229 </view>
230 <view class="flexCss"> 230 <view class="flexCss">
231 <view class="leftCss overflow-one-lines"> 所在场所房屋性质 </view> 231 <view class="leftCss overflow-one-lines"> 所在场所房屋性质 </view>
232 - <view class="rightCss overflow-one-lines"> {{allData.houseNature}} </view> 232 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSE_NATURE, allData.houseNature) || "" }} </view>
233 </view> 233 </view>
234 <view class="flexCss"> 234 <view class="flexCss">
235 <view class="leftCss overflow-one-lines"> 所在场所房屋类型 </view> 235 <view class="leftCss overflow-one-lines"> 所在场所房屋类型 </view>
236 - <view class="rightCss overflow-one-lines"> {{allData.houseAttribute}} </view> 236 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_COMMERCE_ATTRIBUTE, allData.houseAttribute) || "" }} </view>
237 </view> 237 </view>
238 <view class="flexCss"> 238 <view class="flexCss">
239 <view class="leftCss overflow-one-lines"> 所在场所房屋结构类型 </view> 239 <view class="leftCss overflow-one-lines"> 所在场所房屋结构类型 </view>
240 - <view class="rightCss overflow-one-lines"> {{allData.houseStructure}} </view> 240 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_HOUSE_STRUCTURE, allData.houseStructure) || "" }} </view>
241 </view> 241 </view>
242 <view class="flexCss"> 242 <view class="flexCss">
243 <view class="leftCss overflow-one-lines"> 所在场所房屋建设年限 </view> 243 <view class="leftCss overflow-one-lines"> 所在场所房屋建设年限 </view>
244 - <view class="rightCss overflow-one-lines"> {{allData.houseYear}} </view> 244 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_BUILD_YEAR, allData.houseYear) || "" }} </view>
245 </view> 245 </view>
246 <view class="flexCss"> 246 <view class="flexCss">
247 <view class="leftCss overflow-one-lines"> 所在房屋是否列入拆迁规划 </view> 247 <view class="leftCss overflow-one-lines"> 所在房屋是否列入拆迁规划 </view>
248 - <view class="rightCss overflow-one-lines"> {{allData.isPlan}} </view> 248 + <view class="rightCss overflow-one-lines"> {{allData.isPlan?'是':'否'}} </view>
249 </view> 249 </view>
250 <view class="flexCss"> 250 <view class="flexCss">
251 <view class="leftCss overflow-one-lines"> 水/电表是否一户一表 </view> 251 <view class="leftCss overflow-one-lines"> 水/电表是否一户一表 </view>
252 - <view class="rightCss overflow-one-lines"> {{allData.isSingleMeter}} </view> 252 + <view class="rightCss overflow-one-lines"> {{allData.isSingleMeter?'是':'否'}} </view>
253 </view> 253 </view>
254 <view class="flexCss"> 254 <view class="flexCss">
255 <view class="leftCss overflow-one-lines"> 是否有供暖需求 </view> 255 <view class="leftCss overflow-one-lines"> 是否有供暖需求 </view>
256 - <view class="rightCss overflow-one-lines"> {{allData.isHeating}} </view> 256 + <view class="rightCss overflow-one-lines"> {{allData.isHeating?'是':'否'}} </view>
257 </view> 257 </view>
258 <view class="flexCss"> 258 <view class="flexCss">
259 <view class="leftCss overflow-one-lines"> 所在房屋距离中压管道 </view> 259 <view class="leftCss overflow-one-lines"> 所在房屋距离中压管道 </view>
260 - <view class="rightCss overflow-one-lines"> {{allData.distance}} </view> 260 + <view class="rightCss overflow-one-lines"> {{allData.distance?'是':'否'}} </view>
261 </view> 261 </view>
262 <view class="flexCss"> 262 <view class="flexCss">
263 <view class="leftCss overflow-one-lines"> 现使用能源 </view> 263 <view class="leftCss overflow-one-lines"> 现使用能源 </view>
264 - <view class="rightCss overflow-one-lines"> {{allData.currentEnergy}} </view> 264 + <view class="rightCss overflow-one-lines"> {{allData.currentEnergy?'是':'否'}} </view>
265 </view> 265 </view>
266 <view class="flexCss"> 266 <view class="flexCss">
267 <view class="leftCss overflow-one-lines"> 现使用能源价格(元) </view> 267 <view class="leftCss overflow-one-lines"> 现使用能源价格(元) </view>
@@ -292,15 +292,15 @@ @@ -292,15 +292,15 @@
292 <view class="" v-if="type == 2"> 292 <view class="" v-if="type == 2">
293 <view class="flexCss"> 293 <view class="flexCss">
294 <view class="leftCss overflow-one-lines"> 是否已供气 </view> 294 <view class="leftCss overflow-one-lines"> 是否已供气 </view>
295 - <view class="rightCss overflow-one-lines"> {{allData.isProvide}} </view> 295 + <view class="rightCss overflow-one-lines"> {{allData.isProvide?'是':'否'}} </view>
296 </view> 296 </view>
297 <view class="flexCss"> 297 <view class="flexCss">
298 <view class="leftCss overflow-one-lines"> 商业状态 </view> 298 <view class="leftCss overflow-one-lines"> 商业状态 </view>
299 - <view class="rightCss overflow-one-lines"> {{allData.commercialStatus}} </view> 299 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_COMMERCIAL_STATUS, allData.commercialStatus) || "" }} </view>
300 </view> 300 </view>
301 <view class="flexCss"> 301 <view class="flexCss">
302 <view class="leftCss overflow-one-lines"> 项目类别 </view> 302 <view class="leftCss overflow-one-lines"> 项目类别 </view>
303 - <view class="rightCss overflow-one-lines"> {{allData.projectType}} </view> 303 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_PROJECT_TYPE, allData.projectType) || "" }} </view>
304 </view> 304 </view>
305 <view class="flexCss"> 305 <view class="flexCss">
306 <view class="leftCss overflow-one-lines"> 行业分类 </view> 306 <view class="leftCss overflow-one-lines"> 行业分类 </view>
@@ -308,7 +308,7 @@ @@ -308,7 +308,7 @@
308 </view> 308 </view>
309 <view class="flexCss"> 309 <view class="flexCss">
310 <view class="leftCss overflow-one-lines"> 最近管道距离 </view> 310 <view class="leftCss overflow-one-lines"> 最近管道距离 </view>
311 - <view class="rightCss overflow-one-lines"> {{allData.distance}} </view> 311 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_DISTANCE, allData.distance) || "" }} </view>
312 </view> 312 </view>
313 <view class="flexCss"> 313 <view class="flexCss">
314 <view class="leftCss overflow-one-lines"> 预计最大开口气量 </view> 314 <view class="leftCss overflow-one-lines"> 预计最大开口气量 </view>
@@ -316,11 +316,12 @@ @@ -316,11 +316,12 @@
316 </view> 316 </view>
317 <view class="flexCss"> 317 <view class="flexCss">
318 <view class="leftCss overflow-one-lines"> 预计签约日期 </view> 318 <view class="leftCss overflow-one-lines"> 预计签约日期 </view>
319 - <view class="rightCss overflow-one-lines"> {{allData.predictSign}} </view> 319 + <view class="rightCss overflow-one-lines"> {{ $dayjs().UTC(allData.predictSign).format('YYYY') || ""}} </view>
320 </view> 320 </view>
321 <view class="flexCss"> 321 <view class="flexCss">
322 <view class="leftCss overflow-one-lines"> 预计安装日期 </view> 322 <view class="leftCss overflow-one-lines"> 预计安装日期 </view>
323 - <view class="rightCss overflow-one-lines"> {{allData.predictInstall}} </view> 323 + <!-- <view class="rightCss overflow-one-lines"> {{ $dayjs(allData.predictInstall).format('yyyy') || ""}} </view> -->
  324 + <view class="rightCss overflow-one-lines"> {{ allData.predictInstall || ""}} </view>
324 </view> 325 </view>
325 <view class="flexCss"> 326 <view class="flexCss">
326 <view class="leftCss overflow-one-lines"> 预计日用气量 </view> 327 <view class="leftCss overflow-one-lines"> 预计日用气量 </view>
@@ -328,7 +329,7 @@ @@ -328,7 +329,7 @@
328 </view> 329 </view>
329 <view class="flexCss"> 330 <view class="flexCss">
330 <view class="leftCss overflow-one-lines"> 耗能设备名称 </view> 331 <view class="leftCss overflow-one-lines"> 耗能设备名称 </view>
331 - <view class="rightCss overflow-one-lines"> {{allData.machineName}} </view> 332 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_MACHINE_NAME, allData.machineName) || "" }} </view>
332 </view> 333 </view>
333 <view class="flexCss"> 334 <view class="flexCss">
334 <view class="leftCss overflow-one-lines"> 耗能设备型号 </view> 335 <view class="leftCss overflow-one-lines"> 耗能设备型号 </view>
@@ -336,7 +337,7 @@ @@ -336,7 +337,7 @@
336 </view> 337 </view>
337 <view class="flexCss"> 338 <view class="flexCss">
338 <view class="leftCss overflow-one-lines"> 用能类型 </view> 339 <view class="leftCss overflow-one-lines"> 用能类型 </view>
339 - <view class="rightCss overflow-one-lines"> {{allData.userType}} </view> 340 + <view class="rightCss overflow-one-lines"> {{ getDictDataLabel(DICT_TYPE.SYS_INDUSTRY_TYPE, allData.userType) || "" }} </view>
340 </view> 341 </view>
341 <view class="flexCss"> 342 <view class="flexCss">
342 <view class="leftCss overflow-one-lines"> 更新时间 </view> 343 <view class="leftCss overflow-one-lines"> 更新时间 </view>
@@ -433,7 +434,7 @@ @@ -433,7 +434,7 @@
433 box-sizing: border-box; 434 box-sizing: border-box;
434 font-family: '苹方 中等', '苹方', sans-serif; 435 font-family: '苹方 中等', '苹方', sans-serif;
435 color: #2b3950; 436 color: #2b3950;
436 - text-align: left; 437 + text-align: right;
437 line-height: normal; 438 line-height: normal;
438 font-size: 26rpx; 439 font-size: 26rpx;
439 } 440 }
static/images/empty/login-out.png

7.58 KB

static/images/icon/eyeOff.png 0 → 100644

3.41 KB

static/images/icon/eyeOn.png 0 → 100644

1.94 KB

static/images/icon/login-out.png 0 → 100644

2.41 KB

static/images/icon/nodata.png 0 → 100644

100 KB

static/images/icon/pwd.png 0 → 100644

2.46 KB

static/images/icon/user.png 0 → 100644

4.11 KB

store/mudules/dict.js
@@ -32,12 +32,13 @@ const actions = { @@ -32,12 +32,13 @@ const actions = {
32 } 32 }
33 // 处理 dictValue 层级 33 // 处理 dictValue 层级
34 dictDataMap[dictData.dictType].push({ 34 dictDataMap[dictData.dictType].push({
35 - value: dictData.value,  
36 - label: dictData.label,  
37 - colorType: dictData.colorType,  
38 - cssClass: dictData.cssClass, 35 + value: dictData.dictValue,
  36 + label: dictData.dictLabel,
  37 + // colorType: dictData.colorType,
  38 + // cssClass: dictData.cssClass,
39 }) 39 })
40 }) 40 })
  41 + console.log(dictDataMap);
41 // 存储到 Store 中 42 // 存储到 Store 中
42 commit('SET_DICT_DATAS', dictDataMap) 43 commit('SET_DICT_DATAS', dictDataMap)
43 }) 44 })
store/mudules/user.js
@@ -8,6 +8,9 @@ const user = { @@ -8,6 +8,9 @@ const user = {
8 state: { 8 state: {
9 accessToken: uni.getStorageSync(AccessTokenKey), // 访问令牌 9 accessToken: uni.getStorageSync(AccessTokenKey), // 访问令牌
10 refreshToken: uni.getStorageSync(RefreshTokenKey), // 刷新令牌 10 refreshToken: uni.getStorageSync(RefreshTokenKey), // 刷新令牌
  11 + roleId:"",
  12 + entity:"",
  13 + entityName:"",
11 userInfo: {} 14 userInfo: {}
12 }, 15 },
13 mutations: { 16 mutations: {
@@ -28,8 +31,20 @@ const user = { @@ -28,8 +31,20 @@ const user = {
28 const { access_token, refresh_token } = data 31 const { access_token, refresh_token } = data
29 state.accessToken = access_token 32 state.accessToken = access_token
30 state.refreshToken = refresh_token 33 state.refreshToken = refresh_token
  34 + const sysUser = data.sysUser;
  35 + const ysEntities = sysUser.ysEntities || []
  36 + let roleIdString = sysUser.roles.map(role => role.roleId).join(',') || "";
  37 + let entityString = ysEntities.map(item => item.entity).join(',') || "";
  38 + let entityNameString = ysEntities.map(item => item.entityName).join(',') || "";
  39 + console.log(roleIdString,entityString,entityNameString);
  40 + state.roleId = roleIdString;
  41 + state.entity = entityString;
  42 + state.entityName = entityNameString;
  43 + uni.setStorageSync('roleId', roleIdString)
  44 + uni.setStorageSync('entity', entityString)
  45 + uni.setStorageSync('entityName', entityNameString)
31 uni.setStorageSync(AccessTokenKey, access_token) 46 uni.setStorageSync(AccessTokenKey, access_token)
32 - uni.setStorageSync(RefreshTokenKey, refresh_token) 47 + // uni.setStorageSync(RefreshTokenKey, refresh_token)
33 48
34 // 加载用户信息 49 // 加载用户信息
35 // this.dispatch('ObtainUserInfo') 50 // this.dispatch('ObtainUserInfo')
@@ -45,6 +60,9 @@ const user = { @@ -45,6 +60,9 @@ const user = {
45 state.accessToken = '' 60 state.accessToken = ''
46 state.refreshToken = '' 61 state.refreshToken = ''
47 state.userInfo = {} 62 state.userInfo = {}
  63 + uni.reLaunch({
  64 + url:'/pages/login/mobile'
  65 + })
48 } 66 }
49 }, 67 },
50 actions: { 68 actions: {
utils/dict.js 0 → 100644
@@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
  1 +/**
  2 + * Created by 芋道源码
  3 + *
  4 + * 数据字典工具类
  5 + */
  6 +import store from '@/store'
  7 +
  8 +export const DICT_TYPE = {
  9 + // ========== APP模块 ==========
  10 + SYS_PLATE_NAME: 'sys_plate_name', // 板块名称
  11 + SYS_HOUSEHOLD_AGE: 'sys_household_age', // 户主年龄
  12 + SYS_LIVE_NO:'sys_live_no', //居住人口
  13 + SYS_BUILD_YEAR:'sys_build_year', //房屋建设年限
  14 + SYS_HOUSE_ATTRIBUTE:'sys_house_attribute', //房屋性质
  15 + SYS_LIVE_ATTRIBUTE:'sys_live_attribute', //居住属性
  16 + SYS_HOUSE_NATURE:'sys_house_nature', // 房屋居住性质
  17 + SYS_HOUSE_STRUCTURE:'sys_house_structure', //房屋结构类型
  18 + SYS_DISTANCE:'sys_distance', //到中压管道距离
  19 + SYS_CURRENT_ENERGY:'sys_current_energy', //现使用能源
  20 + SYS_BUSINESS_SCOPE:'sys_business_scope', //经营范围
  21 + SYS_COMMERCE_ATTRIBUTE:'sys_commerce_attribute', //商业所在场所房屋类型
  22 + SYS_MACHINE_NAME:'sys_machine_name', //耗能设备名称
  23 + SYS_INDUSTRY_TYPE:'sys_industry_type', //用能类型
  24 + SYS_INDUSTRY_DUTIES:'sys_industry_duties', //职务
  25 + SYS_REPORT_STATUS:'sys_report_status', //洞察报告状态
  26 + SYS_INSIGH_AREA:'sys_Insigh_area', //区域
  27 + SYS_INSTALL_INCLINATE:'sys_install_inclinate', //用户报装意愿
  28 + SYS_COMMERCIAL_STATUS:'sys_commercial_status', //商机状态
  29 + SYS_PROJECT_TYPE:'sys_project_type', //项目类别
  30 + SYS_KEYWORD:'sys_keyword', //市场咨询关键词
  31 + SYS_PUBLISH_STATUS:'sys_publish_status', //资讯状态
  32 +}
  33 +
  34 +/**
  35 + * 获取 dictType 对应的数据字典数组
  36 + *
  37 + * @param dictType 数据类型
  38 + * @returns {*|Array} 数据字典数组
  39 + */
  40 +export function getDictDatas(dictType) {
  41 + return store.getters.dict_datas[dictType] || []
  42 +}
  43 +
  44 +/**
  45 + * 获取 dictType 对应的数据字典数组
  46 + *
  47 + * @param dictType 数据类型
  48 + * @param values 数组、单个元素
  49 + * @returns {*|Array} 数据字典数组
  50 + */
  51 +export function getDictDatas2(dictType, values) {
  52 + if (values === undefined) {
  53 + return [];
  54 + }
  55 + // 如果是单个元素,则转换成数组
  56 + if (!Array.isArray(values)) {
  57 + values = [this.value];
  58 + }
  59 + // 获得字典数据
  60 + const results = [];
  61 + for (const value of values) {
  62 + const dict = getDictData(dictType, value);
  63 + if (dict) {
  64 + results.push(dict);
  65 + }
  66 + }
  67 + return results;
  68 +}
  69 +
  70 +export function getDictData(dictType, value) {
  71 + // 获取 dictType 对应的数据字典数组
  72 + const dictDatas = getDictDatas(dictType)
  73 + if (!dictDatas || dictDatas.length === 0) {
  74 + return ''
  75 + }
  76 + // 获取 value 对应的展示名
  77 + value = value + '' // 强制转换成字符串,因为 DictData 小类数值,是字符串
  78 + for (const dictData of dictDatas) {
  79 + if (dictData.value === value) {
  80 + return dictData;
  81 + }
  82 + }
  83 + return undefined
  84 +}
  85 +
  86 +export function getDictDataLabel(dictType, value) {
  87 + const dict = getDictData(dictType, value);
  88 + return dict ? dict.label : '';
  89 +}
utils/request/responseInterceptors.js
@@ -31,6 +31,7 @@ module.exports = vm =&gt; { @@ -31,6 +31,7 @@ module.exports = vm =&gt; {
31 isRefreshToken = true 31 isRefreshToken = true
32 // 1. 如果获取不到刷新令牌,则只能执行登出操作 32 // 1. 如果获取不到刷新令牌,则只能执行登出操作
33 if (!vm.$store.getters.refreshToken) { 33 if (!vm.$store.getters.refreshToken) {
  34 + console.log("token失效,退出登录");
34 vm.$store.commit('CLEAR_LOGIN_INFO') 35 vm.$store.commit('CLEAR_LOGIN_INFO')
35 return Promise.reject(res) 36 return Promise.reject(res)
36 } 37 }
@@ -5,11 +5,12 @@ module.exports = { @@ -5,11 +5,12 @@ module.exports = {
5 // 调试时允许内网穿透,让外网的人访问到本地调试的H5页面 5 // 调试时允许内网穿透,让外网的人访问到本地调试的H5页面
6 disableHostCheck: true, 6 disableHostCheck: true,
7 // /本地调试时打开 7 // /本地调试时打开
8 - port: '8081', //代理端口,不固定8222,可以是其他的 8 + port: '18082', //代理端口,不固定8222,可以是其他的
9 open: false, //项目启动时是否自动打开浏览器 9 open: false, //项目启动时是否自动打开浏览器
10 proxy: { 10 proxy: {
11 '/api': { 11 '/api': {
12 - target: 'http://172.17.56.37/api', //接口地址 12 + target: 'http://172.17.56.37/api', //测试接口地址
  13 + // target: 'http://172.17.56.16/api', //正式接口地址
13 // ws:true, //允许ws跨域 14 // ws:true, //允许ws跨域
14 secure:true, //类型:https=false http=true 15 secure:true, //类型:https=false http=true
15 changeOrigin: true, //是否跨域 16 changeOrigin: true, //是否跨域