Commit 6c67929052e5b04cedb62e3d3f9b3f0b25d8c04d
1 parent
1af1c1b1
3/6a上午
Showing
47 changed files
with
1547 additions
and
304 deletions
manifest.json
| ... | ... | @@ -101,10 +101,10 @@ |
| 101 | 101 | // }, |
| 102 | 102 | "icons" : { |
| 103 | 103 | "android" : { |
| 104 | - "hdpi" : "unpackage/res/icons/72x72.png", | |
| 105 | - "xhdpi" : "unpackage/res/icons/96x96.png", | |
| 106 | - "xxhdpi" : "unpackage/res/icons/144x144.png", | |
| 107 | - "xxxhdpi" : "unpackage/res/icons/192x192.png" | |
| 104 | + "hdpi" : "static/appLogo.png", | |
| 105 | + "xhdpi" : "static/appLogo.png", | |
| 106 | + "xxhdpi" : "", | |
| 107 | + "xxxhdpi" : "" | |
| 108 | 108 | } |
| 109 | 109 | }, |
| 110 | 110 | // "ios" : { | ... | ... |
pages.json
| ... | ... | @@ -70,7 +70,7 @@ |
| 70 | 70 | { |
| 71 | 71 | "path": "pages/conDetail/conDetail", |
| 72 | 72 | "style": { |
| 73 | - "navigationBarTitleText": "", | |
| 73 | + "navigationBarTitleText": "党的建设详情", | |
| 74 | 74 | "navigationBarBackgroundColor": "#FFFFFF" |
| 75 | 75 | } |
| 76 | 76 | }, { |
| ... | ... | @@ -118,7 +118,7 @@ |
| 118 | 118 | }, { |
| 119 | 119 | "path": "pages/equip/equip", |
| 120 | 120 | "style": { |
| 121 | - "navigationBarTitleText": "机构", | |
| 121 | + "navigationBarTitleText": "供应和需求", | |
| 122 | 122 | "navigationBarBackgroundColor": "#FFFFFF" |
| 123 | 123 | } |
| 124 | 124 | }, |
| ... | ... | @@ -332,7 +332,7 @@ |
| 332 | 332 | { |
| 333 | 333 | "path": "pages/postNotice/postNotice", |
| 334 | 334 | "style": { |
| 335 | - "navigationBarTitleText": "公式公告发布", | |
| 335 | + "navigationBarTitleText": "公示公告发布", | |
| 336 | 336 | "enablePullDownRefresh": false |
| 337 | 337 | } |
| 338 | 338 | }, |
| ... | ... | @@ -458,6 +458,14 @@ |
| 458 | 458 | "navigationBarTitleText" : "诉求信息", |
| 459 | 459 | "enablePullDownRefresh" : false |
| 460 | 460 | } |
| 461 | + }, | |
| 462 | + { | |
| 463 | + "path" : "pages/official/newGroup/newGroup", | |
| 464 | + "style" : | |
| 465 | + { | |
| 466 | + "navigationBarTitleText" : "分组列表和新建分组", | |
| 467 | + "enablePullDownRefresh" : false | |
| 468 | + } | |
| 461 | 469 | } |
| 462 | 470 | |
| 463 | 471 | // { | ... | ... |
pages/Feedback/Feedback.vue
| 1 | 1 | <template> |
| 2 | 2 | <!-- 管理员查看页面 --> |
| 3 | - <view class="page" v-if="userCode === 'admin'"> | |
| 3 | + <view class="page" v-if="isAdmin"> | |
| 4 | 4 | <!-- <zb-tab |
| 5 | 5 | :activeStyle="{ |
| 6 | 6 | fontWeight: 'bold', |
| ... | ... | @@ -101,25 +101,42 @@ import { use } from 'echarts'; |
| 101 | 101 | name: '无效', |
| 102 | 102 | value: 3, |
| 103 | 103 | }], |
| 104 | - appealList:[] | |
| 104 | + appealList:[], | |
| 105 | + isAdmin:false, | |
| 105 | 106 | }; |
| 106 | 107 | |
| 107 | 108 | }, |
| 108 | - onLoad() { | |
| 109 | + onShow() { | |
| 109 | 110 | this.getUser() |
| 110 | 111 | let user = uni.getStorageSync('user') |
| 111 | 112 | this.lastModifyUserId = user.userInfo.userId |
| 112 | 113 | this.getAppealList() |
| 113 | 114 | }, |
| 115 | + // onLoad() { | |
| 116 | + // this.getUser() | |
| 117 | + // let user = uni.getStorageSync('user') | |
| 118 | + // this.lastModifyUserId = user.userInfo.userId | |
| 119 | + // this.getAppealList() | |
| 120 | + // }, | |
| 114 | 121 | methods:{ |
| 115 | - // 获取用户信息 | |
| 122 | + // 获取用户信息判断是否有诉求管理的ID,权限判断authority = 359968822326723845 | |
| 116 | 123 | getUser(){ |
| 117 | 124 | if (uni.getStorageSync('user')) { |
| 118 | - let userCode = uni.getStorageSync('user').userInfo.userId | |
| 125 | + let userCode = uni.getStorageSync('user') | |
| 119 | 126 | console.log('this.userCode',userCode) |
| 120 | 127 | this.userCode = userCode |
| 121 | 128 | // this.userInfo = this.userCode.userAccount |
| 122 | 129 | // this.userInfo = '123456' |
| 130 | + let authorityID = userCode.permissionList | |
| 131 | + this.isAdmin = authorityID.some(it => it.modelId === '359968822326723845') | |
| 132 | + if(this.isAdmin && !userCode.userInfo.isCompany){ | |
| 133 | + uni.showToast({ | |
| 134 | + icon:"error", | |
| 135 | + title:"您无该权限!" | |
| 136 | + }) | |
| 137 | + } | |
| 138 | + console.log('是否有诉求管理权限',this.isAdmin) | |
| 139 | + console.log(userCode) | |
| 123 | 140 | console.log('用户已登录!') |
| 124 | 141 | } else { |
| 125 | 142 | uni.showToast({ | ... | ... |
pages/chooseCom/chooseCom.vue
| ... | ... | @@ -59,7 +59,7 @@ |
| 59 | 59 | onShow() { |
| 60 | 60 | this.getUser() |
| 61 | 61 | this.getTypeOfCompany() |
| 62 | - this.getTypeCompanyList('365139048618001669') | |
| 62 | + this.getTypeCompanyList(null) | |
| 63 | 63 | // this.getCompanyList() |
| 64 | 64 | // this.getTypeOfCompany() |
| 65 | 65 | }, |
| ... | ... | @@ -99,13 +99,18 @@ |
| 99 | 99 | // 获取企业分类 |
| 100 | 100 | getTypeOfCompany() { |
| 101 | 101 | request({ |
| 102 | - url: '/api/system/DictionaryData/365138541614728453', | |
| 102 | + url: 'https://www.dygxq-es.cn/api/system/DictionaryData/365138541614728453?n=1709621749&keyword=&isTree=1', | |
| 103 | 103 | method: 'get', |
| 104 | 104 | data: {} |
| 105 | 105 | }).then(res => { |
| 106 | 106 | if (res.code == 200) { |
| 107 | 107 | console.log(res) |
| 108 | 108 | this.items = [] |
| 109 | + this.items.push({ | |
| 110 | + text: "全部", | |
| 111 | + id: null, | |
| 112 | + children: [] | |
| 113 | + }) | |
| 109 | 114 | for (let i = 0; i < res.data.list.length; i++) { |
| 110 | 115 | this.items.push({ |
| 111 | 116 | text: res.data.list[i].fullName, |
| ... | ... | @@ -125,7 +130,7 @@ |
| 125 | 130 | // 根据分类获取企业列表 |
| 126 | 131 | getTypeCompanyList(id) { |
| 127 | 132 | request({ |
| 128 | - url: '/api/permission/organize/list', | |
| 133 | + url: 'https://www.dygxq-es.cn/api/permission/Organize/list?n=1709623341', | |
| 129 | 134 | method: 'get', |
| 130 | 135 | data: { |
| 131 | 136 | pageSize: 1000, | ... | ... |
pages/conDetail/conDetail.vue
| ... | ... | @@ -17,10 +17,10 @@ |
| 17 | 17 | </view> |
| 18 | 18 | </view> |
| 19 | 19 | <!-- 修改与删除 --> |
| 20 | - <view class="buttons" v-show="isAdmin"> | |
| 20 | + <!-- <view class="buttons" v-show="isAdmin"> | |
| 21 | 21 | <button type="primary" size="mini" @click="change(detailData.id)">修改</button> |
| 22 | 22 | <button type="warn" size="mini" @click="del(detailData.id)">删除</button> |
| 23 | - </view> | |
| 23 | + </view> --> | |
| 24 | 24 | </view> |
| 25 | 25 | </template> |
| 26 | 26 | ... | ... |
pages/construct/construct.vue
| ... | ... | @@ -61,20 +61,16 @@ import utils from '../../service/utils'; |
| 61 | 61 | this.getConstructList() |
| 62 | 62 | }, |
| 63 | 63 | methods:{ |
| 64 | - // 获取用户信息 | |
| 64 | + // 获取用户信息判断是否有党建建设发布的ID,权限判断authority = 519148751890154757 | |
| 65 | 65 | getUser(){ |
| 66 | 66 | if (uni.getStorageSync('user')) { |
| 67 | 67 | let userCode = uni.getStorageSync('user') |
| 68 | 68 | // console.log("用户的code", this.userCode) |
| 69 | 69 | this.userId = userCode.userInfo.userId |
| 70 | - this.userName = userCode.userInfo.userAccount | |
| 71 | - this.userIcon = userCode.userInfo.headIcon | |
| 72 | - this.organizeName = userCode.userInfo.organizeName | |
| 73 | - // this.isAdmin = userCode.userInfo.isCompany | |
| 74 | 70 | console.log(userCode) |
| 75 | - if(userCode.userInfo.userId === 'admin'){ | |
| 76 | - this.isAdmin = true | |
| 77 | - } | |
| 71 | + let authorityID = userCode.permissionList | |
| 72 | + this.isAdmin = authorityID.some(it => it.modelId === '519148751890154757') | |
| 73 | + console.log('是否有党建发布权限',this.isAdmin) | |
| 78 | 74 | } else { |
| 79 | 75 | uni.showToast({ |
| 80 | 76 | title: '请登录', | ... | ... |
pages/datain/datain.vue
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <!-- <qiun-title-bar title="柱状图+渐变色" /> --> |
| 5 | 5 | <view class="charts-box" v-if="userId === '360267753694692613'"> |
| 6 | 6 | <view class="example-body"> |
| 7 | - <uni-datetime-picker v-model="range" type="daterange" @change="change" /> | |
| 7 | + <uni-datetime-picker v-model="range" type="daterange" @change="change" /> | |
| 8 | 8 | </view> |
| 9 | 9 | <view class="biao-item"> |
| 10 | 10 | <view class="biao"> |
| ... | ... | @@ -24,6 +24,14 @@ |
| 24 | 24 | </view> |
| 25 | 25 | <view class="biao-item"> |
| 26 | 26 | <view class="biao"> |
| 27 | + 园区企业量、园区服务、产品量专家人才、惠企政策等 | |
| 28 | + </view> | |
| 29 | + <view class="charts"> | |
| 30 | + <qiun-data-charts type="column" :opts="opts1" :chartData="chartsDataColumn4" /> | |
| 31 | + </view> | |
| 32 | + </view> | |
| 33 | + <view class="biao-item"> | |
| 34 | + <view class="biao"> | |
| 27 | 35 | 进口总额和出口总额 |
| 28 | 36 | </view> |
| 29 | 37 | <view class="charts"> |
| ... | ... | @@ -32,6 +40,30 @@ |
| 32 | 40 | </view> |
| 33 | 41 | <view class="biao-item"> |
| 34 | 42 | <view class="biao"> |
| 43 | + 平台访问统计 | |
| 44 | + </view> | |
| 45 | + <view class="charts"> | |
| 46 | + <qiun-data-charts type="column" :opts="opts1" :chartData="chartsDataColumn6" /> | |
| 47 | + </view> | |
| 48 | + </view> | |
| 49 | + <view class="biao-item"> | |
| 50 | + <view class="biao"> | |
| 51 | + 占地面积Top5 | |
| 52 | + </view> | |
| 53 | + <view class="charts"> | |
| 54 | + <qiun-data-charts type="bar" :opts="opts3" :chartData="chartsDataColumn5" /> | |
| 55 | + </view> | |
| 56 | + </view> | |
| 57 | + <view class="biao-item"> | |
| 58 | + <view class="biao"> | |
| 59 | + 产品数量统计 | |
| 60 | + </view> | |
| 61 | + <view class="charts"> | |
| 62 | + <qiun-data-charts type="pie" :opts="opts2" :chartData="chartData5" /> | |
| 63 | + </view> | |
| 64 | + </view> | |
| 65 | + <view class="biao-item"> | |
| 66 | + <view class="biao"> | |
| 35 | 67 | 填报企业规模大览 |
| 36 | 68 | </view> |
| 37 | 69 | <view class="charts"> |
| ... | ... | @@ -51,15 +83,15 @@ |
| 51 | 83 | 填报企业从业人数大览 |
| 52 | 84 | </view> |
| 53 | 85 | <view class="charts"> |
| 54 | - <qiun-data-charts type="pie" :opts="opts2" :chartData="chartData4"/> | |
| 86 | + <qiun-data-charts type="pie" :opts="opts2" :chartData="chartData4" /> | |
| 55 | 87 | </view> |
| 56 | 88 | </view> |
| 57 | 89 | </view> |
| 58 | - | |
| 59 | - | |
| 90 | + | |
| 91 | + | |
| 60 | 92 | <view class="listBox" v-else> |
| 61 | 93 | <view class="content"> |
| 62 | - <view class="user-list" v-show="!isAdmin"> | |
| 94 | + <view class="user-list" v-show="isAdmin"> | |
| 63 | 95 | <view class="list" @click="toData" style="background-color:#D32D25;"> |
| 64 | 96 | <view class="title" style="color:white"> |
| 65 | 97 | <text>表单设计</text> |
| ... | ... | @@ -71,6 +103,18 @@ |
| 71 | 103 | </view> |
| 72 | 104 | </view> |
| 73 | 105 | </view> |
| 106 | + <!-- <view class="user-list"> | |
| 107 | + <view class="list" @click="toPostCom()"> | |
| 108 | + <view class="title"> | |
| 109 | + <text>企业信息采集</text> | |
| 110 | + </view> | |
| 111 | + <view class="more-content"> | |
| 112 | + <view class="more-content-img"> | |
| 113 | + <image src="../../static/right2.png"></image> | |
| 114 | + </view> | |
| 115 | + </view> | |
| 116 | + </view> | |
| 117 | + </view> --> | |
| 74 | 118 | <view class="user-list"> |
| 75 | 119 | <view class="list" @click="toPostCom()"> |
| 76 | 120 | <view class="title"> |
| ... | ... | @@ -84,15 +128,16 @@ |
| 84 | 128 | </view> |
| 85 | 129 | </view> |
| 86 | 130 | <view class="user-list" style="padding-top: 0;padding-bottom: 0;" v-for="(item,index) in formList"> |
| 87 | - <view class="list" v-for="(it,index) in item.children"> | |
| 131 | + <view class="list" v-for="(it,index) in item.children"> | |
| 88 | 132 | <view class="title" @click="toForm(it)"> |
| 89 | 133 | <text>{{it.fullName}}</text> |
| 90 | 134 | </view> |
| 91 | 135 | <view class="more-content"> |
| 92 | - <view class="buttons" v-show="!isAdmin" style="margin-right: 20rpx;" @click="toTellInfo"> | |
| 93 | - <button size="mini">通知填写和企业选择</button> | |
| 136 | + <view class="buttons" v-show="isAdmin" style="margin-right: 20rpx;" @click="toTellInfo"> | |
| 137 | + <button size="mini">企业选择</button> | |
| 94 | 138 | </view> |
| 95 | - <view class="buttons" v-show="!isAdmin" style="margin-right: 20rpx;" @click="tellNotice(it.id)"> | |
| 139 | + <view class="buttons" v-show="isAdmin" style="margin-right: 20rpx;" | |
| 140 | + @click="tellNotice(it.id)"> | |
| 96 | 141 | <button size="mini" type="warn">通知</button> |
| 97 | 142 | </view> |
| 98 | 143 | <view class="more-content-img" @click="toForm(it)"> |
| ... | ... | @@ -104,7 +149,7 @@ |
| 104 | 149 | </view> |
| 105 | 150 | </view> |
| 106 | 151 | |
| 107 | - | |
| 152 | + | |
| 108 | 153 | </view> |
| 109 | 154 | </template> |
| 110 | 155 | |
| ... | ... | @@ -121,14 +166,14 @@ |
| 121 | 166 | startDate: '2024-02-20', |
| 122 | 167 | // 结束日期 |
| 123 | 168 | endDate: '2024-2-26', |
| 124 | - isSystem:false, | |
| 169 | + isSystem: false, | |
| 125 | 170 | chartsDataColumn1: { |
| 126 | 171 | categories: [], |
| 127 | 172 | series: [{ |
| 128 | 173 | name: "固投", |
| 129 | 174 | data: [] |
| 130 | 175 | }, |
| 131 | - | |
| 176 | + | |
| 132 | 177 | { |
| 133 | 178 | name: "利润", |
| 134 | 179 | data: [] |
| ... | ... | @@ -137,33 +182,72 @@ |
| 137 | 182 | name: "销售收入", |
| 138 | 183 | data: [] |
| 139 | 184 | }, |
| 140 | - | |
| 141 | - | |
| 185 | + | |
| 186 | + | |
| 142 | 187 | { |
| 143 | 188 | name: "总产值", |
| 144 | 189 | data: [] |
| 145 | 190 | }, |
| 146 | 191 | ] |
| 147 | 192 | }, |
| 148 | - | |
| 193 | + | |
| 149 | 194 | chartsDataColumn2: { |
| 150 | 195 | categories: [], |
| 151 | - series: [ | |
| 196 | + series: [{ | |
| 197 | + name: "数量", | |
| 198 | + data: [] | |
| 199 | + }, | |
| 200 | + | |
| 152 | 201 | { |
| 202 | + name: "税收", | |
| 203 | + data: [] | |
| 204 | + }, | |
| 205 | + ] | |
| 206 | + }, | |
| 207 | + chartsDataColumn6: { | |
| 208 | + categories: [], | |
| 209 | + series: [{ | |
| 153 | 210 | name: "数量", |
| 154 | 211 | data: [] |
| 155 | 212 | }, |
| 156 | - | |
| 213 | + | |
| 157 | 214 | { |
| 158 | 215 | name: "税收", |
| 159 | 216 | data: [] |
| 160 | 217 | }, |
| 161 | 218 | ] |
| 162 | 219 | }, |
| 220 | + chartsDataColumn4: { | |
| 221 | + categories: ['总和'], | |
| 222 | + series: [{ | |
| 223 | + name: "园区企业量", | |
| 224 | + data: [] | |
| 225 | + }, | |
| 226 | + { | |
| 227 | + name: "规上企业量(工业)", | |
| 228 | + data: [] | |
| 229 | + }, | |
| 230 | + { | |
| 231 | + name: "规上企业(限上商贸/服务业)", | |
| 232 | + data: [] | |
| 233 | + }, | |
| 234 | + { | |
| 235 | + name: "园区服务/产品量", | |
| 236 | + data: [] | |
| 237 | + }, | |
| 238 | + { | |
| 239 | + name: "惠企政策", | |
| 240 | + data: [] | |
| 241 | + }, | |
| 242 | + { | |
| 243 | + name: "专家人才", | |
| 244 | + data: [] | |
| 245 | + }, | |
| 246 | + ] | |
| 247 | + }, | |
| 163 | 248 | chartsDataColumn3: { |
| 164 | 249 | categories: [], |
| 165 | - series: [ | |
| 166 | - { | |
| 250 | + series: [{ | |
| 167 | 251 | name: "进口总额", |
| 168 | 252 | data: [] |
| 169 | 253 | }, |
| ... | ... | @@ -173,6 +257,13 @@ |
| 173 | 257 | }, |
| 174 | 258 | ] |
| 175 | 259 | }, |
| 260 | + chartsDataColumn5: { | |
| 261 | + categories: ['一汽解放汽车有限公司四川分公司', '四川华侨凤凰纸业有限公司', '德阳南控科技产业发展有限公司', '四川依科制药有限公司', '四川广汉宝湾国际物流有限公司'], | |
| 262 | + series: [{ | |
| 263 | + name: "占地面积(亩)", | |
| 264 | + data: ['828', '700', '471', '380', '372'] | |
| 265 | + }, ] | |
| 266 | + }, | |
| 176 | 267 | opts1: { |
| 177 | 268 | color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", |
| 178 | 269 | "#ea7ccc" |
| ... | ... | @@ -188,6 +279,14 @@ |
| 188 | 279 | min: 0 |
| 189 | 280 | }] |
| 190 | 281 | }, |
| 282 | + extra: { | |
| 283 | + column: { | |
| 284 | + type: "group", | |
| 285 | + width: 30, | |
| 286 | + activeBgColor: "#000000", | |
| 287 | + activeBgOpacity: 0.08 | |
| 288 | + } | |
| 289 | + } | |
| 191 | 290 | }, |
| 192 | 291 | |
| 193 | 292 | chartData2: { |
| ... | ... | @@ -225,6 +324,11 @@ |
| 225 | 324 | data: [] |
| 226 | 325 | }] |
| 227 | 326 | }, |
| 327 | + chartData5: { | |
| 328 | + series: [{ | |
| 329 | + data: [] | |
| 330 | + }] | |
| 331 | + }, | |
| 228 | 332 | opts2: { |
| 229 | 333 | color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", |
| 230 | 334 | "#ea7ccc" |
| ... | ... | @@ -244,8 +348,40 @@ |
| 244 | 348 | } |
| 245 | 349 | } |
| 246 | 350 | }, |
| 247 | - companysId:[], | |
| 248 | - tellInfo:[] | |
| 351 | + opts3: { | |
| 352 | + color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", | |
| 353 | + "#ea7ccc" | |
| 354 | + ], | |
| 355 | + padding: [15, 30, 0, 5], | |
| 356 | + enableScroll: false, | |
| 357 | + // enableScroll: true, | |
| 358 | + legend: {}, | |
| 359 | + xAxis: { | |
| 360 | + boundaryGap: "justify", | |
| 361 | + disableGrid: false, | |
| 362 | + // disableGrid: true, | |
| 363 | + min: 0, | |
| 364 | + // axisLine: false, | |
| 365 | + axisLine: true, | |
| 366 | + max: 70 | |
| 367 | + }, | |
| 368 | + yAxis: { | |
| 369 | + // min:30 | |
| 370 | + }, | |
| 371 | + extra: { | |
| 372 | + bar: { | |
| 373 | + type: "stack", | |
| 374 | + width: 30, | |
| 375 | + meterBorde: 1, | |
| 376 | + meterFillColor: "#FFFFFF", | |
| 377 | + activeBgColor: "#000000", | |
| 378 | + activeBgOpacity: 0.08, | |
| 379 | + categoryGap: 2 | |
| 380 | + } | |
| 381 | + } | |
| 382 | + }, | |
| 383 | + companysId: [], | |
| 384 | + tellInfo: [] | |
| 249 | 385 | } |
| 250 | 386 | }, |
| 251 | 387 | onUnload() { |
| ... | ... | @@ -255,15 +391,19 @@ |
| 255 | 391 | onLoad() { |
| 256 | 392 | this.getUser() |
| 257 | 393 | this.getPostQing() |
| 394 | + this.getFormList() | |
| 395 | + this.getHomeTopNumber() | |
| 396 | + this.getProNumber() | |
| 397 | + this.getCountNumber() | |
| 258 | 398 | uni.$on('idInfo', res => { |
| 259 | 399 | console.log("选择公司页面返回的公司ID", res) |
| 260 | - if(res.length > 0) | |
| 261 | - this.companysId = res | |
| 400 | + if (res.length > 0) | |
| 401 | + this.companysId = res | |
| 262 | 402 | }) |
| 263 | 403 | uni.$on('tellInfo', res => { |
| 264 | 404 | console.log("tell信息", res) |
| 265 | - if(res.length > 0) | |
| 266 | - this.tellInfo = res | |
| 405 | + if (res.length > 0) | |
| 406 | + this.tellInfo = res | |
| 267 | 407 | }) |
| 268 | 408 | }, |
| 269 | 409 | created() { |
| ... | ... | @@ -274,7 +414,7 @@ |
| 274 | 414 | console.log('change事件:', e); |
| 275 | 415 | this.startDate = e[0]; |
| 276 | 416 | this.endDate = e[1] |
| 277 | - console.log(this.startDate,this.endDate) | |
| 417 | + console.log(this.startDate, this.endDate) | |
| 278 | 418 | this.getPostQing() |
| 279 | 419 | }, |
| 280 | 420 | // 跳转到选择通知企业页面 |
| ... | ... | @@ -284,63 +424,121 @@ |
| 284 | 424 | }) |
| 285 | 425 | }, |
| 286 | 426 | // 进行通知 |
| 287 | - tellNotice(id){ | |
| 427 | + tellNotice(id) { | |
| 288 | 428 | // 进行通知 |
| 289 | 429 | request({ |
| 290 | - url:'/api/extend/demo/SendMessageByApp', | |
| 291 | - method:'post', | |
| 292 | - data:{ | |
| 293 | - title:this.tellInfo[0], | |
| 294 | - companys:this.companysId, | |
| 295 | - desc:this.tellInfo[1], | |
| 296 | - reid:id, | |
| 297 | - type:'表单填报通知', | |
| 298 | - link:'/pages/apply/dynamicModel/index', | |
| 299 | - fangshi:'通知' | |
| 430 | + url: '/api/extend/demo/SendMessageByApp', | |
| 431 | + method: 'post', | |
| 432 | + data: { | |
| 433 | + title: this.tellInfo[0], | |
| 434 | + companys: this.companysId, | |
| 435 | + desc: this.tellInfo[1], | |
| 436 | + reid: id, | |
| 437 | + type: '表单填报通知', | |
| 438 | + link: '/pages/apply/dynamicModel/index', | |
| 439 | + fangshi: '通知' | |
| 300 | 440 | } |
| 301 | - }).then(res=>{ | |
| 302 | - console.log('通知结果',res) | |
| 303 | - if(res.code == 200){ | |
| 441 | + }).then(res => { | |
| 442 | + console.log('通知结果', res) | |
| 443 | + if (res.code == 200) { | |
| 304 | 444 | uni.showToast({ |
| 305 | - icon:"success", | |
| 306 | - title:"通知成功" | |
| 445 | + icon: "success", | |
| 446 | + title: "通知成功" | |
| 307 | 447 | }) |
| 308 | 448 | } |
| 309 | 449 | }) |
| 310 | 450 | }, |
| 311 | - // 获取用户信息 | |
| 312 | - getUser() { | |
| 313 | - // // 获取日期 | |
| 314 | - // // 获取当前日期 | |
| 315 | - // var currentDate = new Date(); | |
| 316 | - | |
| 317 | - // // 获取前七天的日期 | |
| 318 | - // var previousDates = []; | |
| 319 | - // for (var i = 6; i >= 0; i--) { | |
| 320 | - // var previousDate = new Date(currentDate); | |
| 321 | - // previousDate.setDate(currentDate.getDate() - i); | |
| 322 | - // previousDates.push(previousDate); | |
| 323 | - // } | |
| 451 | + // 获取pc端首页等数量 | |
| 452 | + getHomeTopNumber() { | |
| 453 | + this.chartsDataColumn4.series[0].data = [] | |
| 454 | + this.chartsDataColumn4.series[1].data = [] | |
| 455 | + this.chartsDataColumn4.series[2].data = [] | |
| 456 | + this.chartsDataColumn4.series[3].data = [] | |
| 457 | + this.chartsDataColumn4.series[4].data = [] | |
| 458 | + this.chartsDataColumn4.series[5].data = [] | |
| 459 | + request({ | |
| 460 | + url: '/api/SubDev/zyoaarticle/homeTopNumbers', | |
| 461 | + method: 'get', | |
| 462 | + data: {} | |
| 463 | + }).then(res => { | |
| 464 | + console.log('HomeTopNumber', res) | |
| 465 | + if (res.code == 200) { | |
| 324 | 466 | |
| 325 | - // // 格式化日期 | |
| 326 | - // var formattedDates = previousDates.map(function(date) { | |
| 327 | - // var year = date.getFullYear(); | |
| 328 | - // var month = (date.getMonth() + 1).toString().padStart(2, '0'); | |
| 329 | - // var day = date.getDate().toString().padStart(2, '0'); | |
| 330 | - // return year + '-' + month + '-' + day; | |
| 331 | - // }); | |
| 467 | + this.chartsDataColumn4.series[0].data.push(res.data.count_yqqyl) | |
| 468 | + this.chartsDataColumn4.series[1].data.push(res.data.count_gsqyl_gy) | |
| 469 | + this.chartsDataColumn4.series[2].data.push(res.data.count_gsqyl_fwy) | |
| 470 | + this.chartsDataColumn4.series[3].data.push(res.data.count_yqfwcpl) | |
| 471 | + this.chartsDataColumn4.series[4].data.push(res.data.count_hqzc) | |
| 472 | + this.chartsDataColumn4.series[5].data.push(res.data.count_gdrc) | |
| 473 | + console.log(this.chartsDataColumn4) | |
| 474 | + } | |
| 475 | + }) | |
| 476 | + }, | |
| 477 | + // 获取产品数量统计 | |
| 478 | + getProNumber() { | |
| 479 | + this.chartData5.series[0].data = [] | |
| 480 | + request({ | |
| 481 | + url: 'https://www.dygxq-es.cn/api/system/DataInterface/398719263910659333/Actions/Response?n=1709609644', | |
| 482 | + method: 'get', | |
| 483 | + data: {} | |
| 484 | + }).then(res => { | |
| 485 | + console.log('产品数量', res) | |
| 486 | + if (res.code == 200) { | |
| 487 | + this.chartData5.series[0].data = res.data.series[0].data.map(it => { | |
| 488 | + return { | |
| 489 | + name: it.name, | |
| 490 | + value: it.value | |
| 491 | + } | |
| 492 | + }) | |
| 493 | + // for(let i=0;i<res.data.series[0].data.length;i++){ | |
| 494 | + // this.chartData5.series[0].data.push({ | |
| 495 | + // name:res.data.series[0].data[i].name, | |
| 496 | + // data:[res.data.series[0].data[i].value] | |
| 497 | + // }) | |
| 498 | + // } | |
| 499 | + console.log('this.chartData5', this.chartData5) | |
| 500 | + } | |
| 332 | 501 | |
| 333 | - // console.log('日期', formattedDates); // 输出前七天的日期数组 | |
| 334 | - // this.startDate = formattedDates[0] | |
| 335 | - // this.endDate = formattedDates[6] | |
| 502 | + }) | |
| 503 | + }, | |
| 504 | + // 获取平台访问统计 | |
| 505 | + getCountNumber() { | |
| 506 | + this.chartsDataColumn6.series = [] | |
| 507 | + request({ | |
| 508 | + url: "https://www.dygxq-es.cn/api/system/DataInterface/398709672229471493/Actions/Response?n=1709609644", | |
| 509 | + method: 'get', | |
| 510 | + data: {} | |
| 511 | + }).then(res => { | |
| 512 | + console.log('平台访问统计', res) | |
| 513 | + if (res.code == 200) { | |
| 514 | + this.chartsDataColumn6.categories = ['每月访问统计'] | |
| 515 | + for(let i=0;i<res.data.series[0].data.length;i++){ | |
| 516 | + this.chartsDataColumn6.series.push({ | |
| 517 | + name: `${i+1}月`, | |
| 518 | + data: [res.data.series[0].data[i]] | |
| 519 | + }) | |
| 520 | + } | |
| 521 | + // this.chartsDataColumn6.series = res.data.series[0].data.map(it => { | |
| 522 | + // return { | |
| 523 | + // name: '', | |
| 524 | + // data: [it] | |
| 525 | + // } | |
| 526 | + // }) | |
| 527 | + } | |
| 528 | + }) | |
| 529 | + }, | |
| 530 | + // 获取用户信息判断是否有表单设计和企业通知的ID,权限判断authority = 361476463456683269 | |
| 531 | + getUser() { | |
| 336 | 532 | if (uni.getStorageSync('user')) { |
| 337 | 533 | let userCode = uni.getStorageSync('user') |
| 338 | 534 | // console.log("用户的code", this.userCode) |
| 339 | 535 | this.userId = userCode.userInfo.userId |
| 340 | - this.userName = userCode.userInfo.userAccount | |
| 341 | - this.userIcon = userCode.userInfo.headIcon | |
| 342 | - this.organizeName = userCode.userInfo.organizeName | |
| 343 | - this.isAdmin = userCode.userInfo.isCompany | |
| 536 | + // this.userName = userCode.userInfo.userAccount | |
| 537 | + // this.userIcon = userCode.userInfo.headIcon | |
| 538 | + // this.organizeName = userCode.userInfo.organizeName | |
| 539 | + let authorityID = userCode.permissionList | |
| 540 | + this.isAdmin = authorityID.some(it => it.modelId === '361476463456683269') | |
| 541 | + console.log('是否有表单设计和企业通知权限', this.isAdmin) | |
| 344 | 542 | console.log(userCode) |
| 345 | 543 | } else { |
| 346 | 544 | uni.showToast({ |
| ... | ... | @@ -370,6 +568,7 @@ |
| 370 | 568 | that.chartsDataColumn1.series[3].data = [] |
| 371 | 569 | that.chartData3.series[0].data = [] |
| 372 | 570 | that.chartData2.series[0].data = [] |
| 571 | + that.chartData4.series[0].data = [] | |
| 373 | 572 | request({ |
| 374 | 573 | url: '/api/SubDev/baseenterprisemanager/GetDataNumber', |
| 375 | 574 | method: 'get', |
| ... | ... | @@ -378,19 +577,19 @@ |
| 378 | 577 | endDate: this.endDate |
| 379 | 578 | } |
| 380 | 579 | }).then(res => { |
| 381 | - if (res.code == 200) { | |
| 382 | - console.log(res) | |
| 580 | + if (res.code === 200) { | |
| 581 | + console.log('res', res) | |
| 383 | 582 | for (let i = 0; i < res.data.GetCreateDateNumber.length; i++) { |
| 384 | 583 | that.chartsDataColumn1.categories.push(res.data.GetCreateDateNumber[i].Day) |
| 385 | 584 | that.chartsDataColumn2.categories.push(res.data.GetCreateDateNumber[i].Day) |
| 386 | 585 | that.chartsDataColumn3.categories.push(res.data.GetCreateDateNumber[i].Day) |
| 387 | - that.chartsDataColumn3.series[0].data.push(res.data.GetCreateDateNumber[i].Imports) | |
| 586 | + that.chartsDataColumn3.series[0].data.push(res.data.GetCreateDateNumber[i].Imports) | |
| 388 | 587 | that.chartsDataColumn3.series[1].data.push(res.data.GetCreateDateNumber[i] |
| 389 | 588 | .TotalExportValue) |
| 390 | 589 | that.chartsDataColumn2.series[0].data.push(res.data.GetCreateDateNumber[i].Number) |
| 391 | 590 | that.chartsDataColumn2.series[1].data.push(res.data.GetCreateDateNumber[i].Taxation) |
| 392 | 591 | that.chartsDataColumn1.series[0].data.push(res.data.GetCreateDateNumber[i] |
| 393 | - .FixedInvestment) | |
| 592 | + .FixedInvestment) | |
| 394 | 593 | that.chartsDataColumn1.series[1].data.push(res.data.GetCreateDateNumber[i].Profit) |
| 395 | 594 | that.chartsDataColumn1.series[2].data.push(res.data.GetCreateDateNumber[i] |
| 396 | 595 | .SalesRevenue) |
| ... | ... | @@ -454,7 +653,8 @@ |
| 454 | 653 | if (res.code === 600) { |
| 455 | 654 | uni.showToast({ |
| 456 | 655 | icon: "exception", |
| 457 | - title: '登录过期,请重新登录' | |
| 656 | + title: '登录过期,请重新登录', | |
| 657 | + duration: 1500 | |
| 458 | 658 | }) |
| 459 | 659 | } |
| 460 | 660 | this.formList = res.data.list | ... | ... |
pages/equip/equip.scss
pages/equip/equip.vue
pages/home/home.vue
| ... | ... | @@ -215,26 +215,31 @@ |
| 215 | 215 | // 首页模糊查询 |
| 216 | 216 | getMoHuList(){ |
| 217 | 217 | this.selectShow = true |
| 218 | - request({ | |
| 219 | - url:'/api/SubDev/zyoaarticle', | |
| 220 | - method:'get', | |
| 221 | - data:{ | |
| 222 | - keyword:this.selectName | |
| 223 | - } | |
| 224 | - }).then(res=>{ | |
| 225 | - console.log('模糊查询',res.data) | |
| 226 | - if(res.code === 200){ | |
| 227 | - let arr = res.data.list | |
| 228 | - this.comList = arr.map(it=>{ | |
| 229 | - return { | |
| 230 | - ...it, | |
| 231 | - name:it.title | |
| 232 | - } | |
| 233 | - }) | |
| 234 | - this.comList = JSON.parse(JSON.stringify(this.comList)) | |
| 235 | - console.log('mohu',this.comList) | |
| 236 | - } | |
| 237 | - }) | |
| 218 | + if(this.selectName === ''){ | |
| 219 | + this.selectShow = false | |
| 220 | + }else{ | |
| 221 | + request({ | |
| 222 | + url:'/api/SubDev/zyoaarticle', | |
| 223 | + method:'get', | |
| 224 | + data:{ | |
| 225 | + keyword:this.selectName | |
| 226 | + } | |
| 227 | + }).then(res=>{ | |
| 228 | + console.log('模糊查询',res.data) | |
| 229 | + if(res.code === 200){ | |
| 230 | + let arr = res.data.list | |
| 231 | + this.comList = arr.map(it=>{ | |
| 232 | + return { | |
| 233 | + ...it, | |
| 234 | + name:it.title | |
| 235 | + } | |
| 236 | + }) | |
| 237 | + this.comList = JSON.parse(JSON.stringify(this.comList)) | |
| 238 | + console.log('mohu',this.comList) | |
| 239 | + } | |
| 240 | + }) | |
| 241 | + } | |
| 242 | + | |
| 238 | 243 | }, |
| 239 | 244 | select(item) { |
| 240 | 245 | ... | ... |
pages/my/adminMessageList/adminMessageList.vue
| ... | ... | @@ -28,7 +28,8 @@ |
| 28 | 28 | data() { |
| 29 | 29 | return { |
| 30 | 30 | messageList: [], |
| 31 | - isAdmin: false | |
| 31 | + isAdmin: false, | |
| 32 | + baseUrl: 'http://deyanggaoxin.fengshiyun.com' | |
| 32 | 33 | } |
| 33 | 34 | }, |
| 34 | 35 | onShow() { |
| ... | ... | @@ -92,23 +93,94 @@ |
| 92 | 93 | // }) |
| 93 | 94 | // } |
| 94 | 95 | // }) |
| 95 | - uni.navigateTo({ | |
| 96 | - url: link.link + `?data=${JSON.stringify(link.reid)}` | |
| 97 | - }) | |
| 98 | - // request({ | |
| 99 | - // url:`/api/extend/demo/UpdateIsReadEnd?MessageId=${id}`, | |
| 100 | - // method:'put', | |
| 101 | - // data:{} | |
| 102 | - // }).then(res=>{ | |
| 103 | - // console.log("修改已读",res) | |
| 104 | - // if(res.code == 200){ | |
| 105 | - // console.log('成功修改') | |
| 106 | - // uni.navigateTo({ | |
| 107 | - // url:link.link + `?data=${JSON.stringify(link.reid)}` | |
| 108 | - // }) | |
| 109 | - // } | |
| 110 | - // }) | |
| 111 | - } | |
| 96 | + if (link.type === '公文办理通知') { | |
| 97 | + this.download(link.link) | |
| 98 | + } else { | |
| 99 | + uni.navigateTo({ | |
| 100 | + url: link.link + `?data=${JSON.stringify(link.reid)}` | |
| 101 | + }) | |
| 102 | + } | |
| 103 | + | |
| 104 | + if (link.type === '公文办理通知') { | |
| 105 | + this.download(link.link) | |
| 106 | + } else if (link.type === '表单填报通知') { | |
| 107 | + uni.navigateTo({ | |
| 108 | + url: link.link + `?id=${link.reid}` | |
| 109 | + }) | |
| 110 | + } else { | |
| 111 | + uni.navigateTo({ | |
| 112 | + url: link.link + `?data=${JSON.stringify(link.reid)}` | |
| 113 | + }) | |
| 114 | + } | |
| 115 | + // request({ | |
| 116 | + // url: `/api/extend/demo/UpdateIsReadEnd?MessageId=${id}`, | |
| 117 | + // method: 'put', | |
| 118 | + // data: {} | |
| 119 | + // }).then(res => { | |
| 120 | + // console.log("修改已读", res) | |
| 121 | + // if (res.code == 200) { | |
| 122 | + // console.log('成功修改') | |
| 123 | + // if (link.type === '公文办理通知') { | |
| 124 | + // this.download(link.link) | |
| 125 | + // } else { | |
| 126 | + // uni.navigateTo({ | |
| 127 | + // url: link.link + `?data=${JSON.stringify(link.reid)}` | |
| 128 | + // }) | |
| 129 | + // } | |
| 130 | + | |
| 131 | + // if (link.type === '公文办理通知') { | |
| 132 | + // this.download(link.link) | |
| 133 | + // } else if (link.type === '表单填报通知') { | |
| 134 | + // uni.navigateTo({ | |
| 135 | + // url: link.link + `?id=${link.reid}` | |
| 136 | + // }) | |
| 137 | + // } else { | |
| 138 | + // uni.navigateTo({ | |
| 139 | + // url: link.link + `?data=${JSON.stringify(link.reid)}` | |
| 140 | + // }) | |
| 141 | + // } | |
| 142 | + // } | |
| 143 | + // }) | |
| 144 | + }, | |
| 145 | + download(it) { | |
| 146 | + uni.downloadFile({ | |
| 147 | + url: this.baseUrl + it, //下载地址接口返回 | |
| 148 | + success: (data) => { | |
| 149 | + if (data.statusCode === 200) { | |
| 150 | + //文件保存到本地 | |
| 151 | + uni.saveFile({ | |
| 152 | + tempFilePath: data.tempFilePath, //临时路径 | |
| 153 | + success: function(res) { | |
| 154 | + uni.showToast({ | |
| 155 | + icon: 'none', | |
| 156 | + mask: true, | |
| 157 | + title: '文件已保存:' + res.savedFilePath, //保存路径 | |
| 158 | + duration: 3000, | |
| 159 | + }); | |
| 160 | + setTimeout(() => { | |
| 161 | + //打开文档查看 | |
| 162 | + uni.openDocument({ | |
| 163 | + filePath: res.savedFilePath, | |
| 164 | + success: function(res) { | |
| 165 | + // console.log('打开文档成功'); | |
| 166 | + } | |
| 167 | + }); | |
| 168 | + }, 3000) | |
| 169 | + } | |
| 170 | + }); | |
| 171 | + } | |
| 172 | + }, | |
| 173 | + fail: (err) => { | |
| 174 | + that.loadelshow = false | |
| 175 | + console.log(err); | |
| 176 | + uni.showToast({ | |
| 177 | + icon: 'none', | |
| 178 | + mask: true, | |
| 179 | + title: '失败请重新下载', | |
| 180 | + }); | |
| 181 | + }, | |
| 182 | + }); | |
| 183 | + }, | |
| 112 | 184 | } |
| 113 | 185 | } |
| 114 | 186 | </script> | ... | ... |
pages/my/messageList/messageList.vue
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | {{it.MessageContent.BodyText}} |
| 12 | 12 | </view> |
| 13 | 13 | </view> |
| 14 | - <view class="isRead" style="background: red;" v-if="it.MessageReceiveEntity.IsRead === 0"> | |
| 14 | + <view class="isRead" style="background: red;" v-if="it.MessageInfo.IsRead === 0"> | |
| 15 | 15 | 未读 |
| 16 | 16 | </view> |
| 17 | 17 | <view class="isRead" style="background: #009e00;" v-else> | ... | ... |
pages/my/my.vue
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <image :src="baseUrl + userIcon"></image> |
| 15 | 15 | </view> |
| 16 | 16 | <view class="portrait" v-else> |
| 17 | - <image src="../../static/img/head.jpg"></image> | |
| 17 | + <image src="../../static/790.jpg"></image> | |
| 18 | 18 | </view> |
| 19 | 19 | <view class="info"> |
| 20 | 20 | <view class="nickname"> |
| ... | ... | @@ -252,7 +252,19 @@ |
| 252 | 252 | isAdmin:false |
| 253 | 253 | }; |
| 254 | 254 | }, |
| 255 | - onLoad() { | |
| 255 | + // onLoad() { | |
| 256 | + // this.getUser() | |
| 257 | + // this.getSelfProCount() | |
| 258 | + // this.getSelfDemandCount() | |
| 259 | + // this.getSelfZhaoCount() | |
| 260 | + // this.getSelfCom() | |
| 261 | + // if(this.isAdmin){ | |
| 262 | + // this.getAdminNoticeTell() | |
| 263 | + // }else{ | |
| 264 | + // this.getNoticeTell() | |
| 265 | + // } | |
| 266 | + // }, | |
| 267 | + onShow() { | |
| 256 | 268 | this.getUser() |
| 257 | 269 | this.getSelfProCount() |
| 258 | 270 | this.getSelfDemandCount() |
| ... | ... | @@ -299,7 +311,9 @@ |
| 299 | 311 | request({ |
| 300 | 312 | url:'/api/extend/demo/GetMyMessage', |
| 301 | 313 | method:'get', |
| 302 | - data:{} | |
| 314 | + data:{ | |
| 315 | + pageSize:10000 | |
| 316 | + } | |
| 303 | 317 | }).then(res=>{ |
| 304 | 318 | console.log('通知列表',res) |
| 305 | 319 | if(res.code == 200){ |
| ... | ... | @@ -312,7 +326,9 @@ |
| 312 | 326 | request({ |
| 313 | 327 | url:'/api/extend/demo/GetMessageList', |
| 314 | 328 | method:'get', |
| 315 | - data:{} | |
| 329 | + data:{ | |
| 330 | + pageSize:10000 | |
| 331 | + } | |
| 316 | 332 | }).then(res=>{ |
| 317 | 333 | console.log('通知列表',res) |
| 318 | 334 | if(res.code == 200){ |
| ... | ... | @@ -375,11 +391,13 @@ |
| 375 | 391 | request({ |
| 376 | 392 | url: this.baseUrl + '/api/Extend/baseproduct', |
| 377 | 393 | method: 'get', |
| 378 | - data: {} | |
| 394 | + data: { | |
| 395 | + pageSize:10000 | |
| 396 | + } | |
| 379 | 397 | }).then(res => { |
| 380 | 398 | if (res.code === 200) { |
| 381 | - console.log(res) | |
| 382 | 399 | this.proCount = res.data.list.length |
| 400 | + console.log('产品数量',this.proCount,res.data.list) | |
| 383 | 401 | } else { |
| 384 | 402 | uni.showToast({ |
| 385 | 403 | icon: "error", |
| ... | ... | @@ -394,7 +412,9 @@ |
| 394 | 412 | request({ |
| 395 | 413 | url: this.baseUrl + '/api/Extend/demandrelease', |
| 396 | 414 | method: 'get', |
| 397 | - data: {} | |
| 415 | + data: { | |
| 416 | + pageSize:10000 | |
| 417 | + } | |
| 398 | 418 | }).then(res => { |
| 399 | 419 | if (res.code === 200) { |
| 400 | 420 | // console.log(res.data.list.length ,"需求数量") |
| ... | ... | @@ -412,7 +432,9 @@ |
| 412 | 432 | request({ |
| 413 | 433 | url: this.baseUrl + '/api/Extend/basetalentrecruitment', |
| 414 | 434 | method: 'get', |
| 415 | - data: {} | |
| 435 | + data: { | |
| 436 | + pageSize:10000 | |
| 437 | + } | |
| 416 | 438 | }).then(res => { |
| 417 | 439 | if (res.code === 200) { |
| 418 | 440 | console.log(res) |
| ... | ... | @@ -430,7 +452,9 @@ |
| 430 | 452 | request({ |
| 431 | 453 | url: this.baseUrl + '/api/SubDev/baseenterprisemanager', |
| 432 | 454 | method: 'get', |
| 433 | - data: {} | |
| 455 | + data: { | |
| 456 | + pageSize:10000 | |
| 457 | + } | |
| 434 | 458 | }).then(res => { |
| 435 | 459 | if (res.code === 200) { |
| 436 | 460 | console.log(res) | ... | ... |
pages/my/myCom/myCom.vue
| ... | ... | @@ -44,7 +44,9 @@ import utils from '../../../service/utils' |
| 44 | 44 | request({ |
| 45 | 45 | url: this.baseUrl + '/api/SubDev/baseenterprisemanager', |
| 46 | 46 | method: 'get', |
| 47 | - data: {} | |
| 47 | + data: { | |
| 48 | + pageSize:10000 | |
| 49 | + } | |
| 48 | 50 | }).then(res => { |
| 49 | 51 | if (res.code === 200) { |
| 50 | 52 | console.log(res) | ... | ... |
pages/my/myDemand/myDemand.vue
| ... | ... | @@ -44,7 +44,9 @@ import utils from '../../../service/utils' |
| 44 | 44 | request({ |
| 45 | 45 | url: this.baseUrl + '/api/Extend/demandrelease', |
| 46 | 46 | method: 'get', |
| 47 | - data: {} | |
| 47 | + data: { | |
| 48 | + pageSize:10000 | |
| 49 | + } | |
| 48 | 50 | }).then(res => { |
| 49 | 51 | if (res.code === 200) { |
| 50 | 52 | console.log(res) | ... | ... |
pages/my/myPro/myPro.vue
| ... | ... | @@ -44,7 +44,9 @@ import utils from '../../../service/utils' |
| 44 | 44 | request({ |
| 45 | 45 | url: this.baseUrl + '/api/Extend/baseproduct', |
| 46 | 46 | method: 'get', |
| 47 | - data: {} | |
| 47 | + data: { | |
| 48 | + pageSize:10000 | |
| 49 | + } | |
| 48 | 50 | }).then(res => { |
| 49 | 51 | if (res.code === 200) { |
| 50 | 52 | console.log(res) | ... | ... |
pages/my/myZhao/myZhao.vue
pages/my/personalData/index.vue
| ... | ... | @@ -6,11 +6,11 @@ |
| 6 | 6 | </u-cell-item> |
| 7 | 7 | <u-cell-item title="姓名" :value="userInfo.userInfo.userAccount" :arrow="false"></u-cell-item> |
| 8 | 8 | <u-cell-item title="性别" :value="gender" :arrow="false"></u-cell-item> |
| 9 | - <u-cell-item title="所属公司" :value="userInfo.userInfo.organizeName" :arrow="false"></u-cell-item> | |
| 9 | + <u-cell-item title="所属公司" :value="userInfo.userInfo.organizeName" :arrow="false" v-if="userInfo.userInfo.userId !== '360267753694692613'"></u-cell-item> | |
| 10 | 10 | <!-- <u-cell-item title="手机号" :value="userInfo.mobilePhone" :arrow="false"></u-cell-item> --> |
| 11 | 11 | <!-- <u-cell-item title="邮箱" :value="userInfo.email" :arrow="false"></u-cell-item> --> |
| 12 | 12 | </u-cell-group> |
| 13 | - <button type="primary" style="background-color: #D32D25;color: white;margin-top: 100rpx;" @click="loginOut">退出登录</button> | |
| 13 | + <button type="primary" style="width: 90%;margin: 0 auto;border-radius: 20rpx; background-color: #D32D25;color: white;margin-top: 100rpx;" @click="loginOut">退出登录</button> | |
| 14 | 14 | </view> |
| 15 | 15 | </template> |
| 16 | 16 | |
| ... | ... | @@ -21,7 +21,8 @@ |
| 21 | 21 | gender: '', |
| 22 | 22 | birthday: '', |
| 23 | 23 | userInfo: {}, |
| 24 | - baseUrl:'http://deyanggaoxin.fengshiyun.com' | |
| 24 | + baseUrl:'http://deyanggaoxin.fengshiyun.com', | |
| 25 | + | |
| 25 | 26 | } |
| 26 | 27 | }, |
| 27 | 28 | computed: { |
| ... | ... | @@ -31,6 +32,7 @@ |
| 31 | 32 | }, |
| 32 | 33 | onLoad() { |
| 33 | 34 | this.userInfo = uni.getStorageSync('user') || {}; |
| 35 | + | |
| 34 | 36 | console.log(this.userInfo) |
| 35 | 37 | this.gender = this.userInfo.gender == 1 ? '男' : this.userInfo.gender == 2 ? '女' : '保密' |
| 36 | 38 | this.birthday = this.userInfo.birthday ? this.$u.timeFormat(this.userInfo.birthday, 'yyyy-mm-dd') : '' | ... | ... |
pages/news/news.vue
| ... | ... | @@ -50,9 +50,9 @@ |
| 50 | 50 | <view class="thumb" v-if="item.isImg"> |
| 51 | 51 | <image :src="baseUrl + item.imgUrl[0].url"></image> |
| 52 | 52 | </view> |
| 53 | - <view class="thumb" v-else> | |
| 53 | + <!-- <view class="thumb" v-else> | |
| 54 | 54 | <image src="../../static/img/img3.jpg"></image> |
| 55 | - </view> | |
| 55 | + </view> --> | |
| 56 | 56 | </view> |
| 57 | 57 | </view> |
| 58 | 58 | </view> |
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | this.getNewsList('360233879019193605') |
| 126 | 126 | }, |
| 127 | 127 | methods: { |
| 128 | - // 获取用户信息 | |
| 128 | + // 获取用户信息判断是否有公示公告和新闻信息发布的ID,权限判断authority = 194684404600145157 | |
| 129 | 129 | getUser() { |
| 130 | 130 | if (uni.getStorageSync('user')) { |
| 131 | 131 | let userCode = uni.getStorageSync('user') |
| ... | ... | @@ -135,10 +135,9 @@ |
| 135 | 135 | this.userIcon = userCode.userInfo.headIcon |
| 136 | 136 | this.organizeName = userCode.userInfo.organizeName |
| 137 | 137 | // this.isAdmin = userCode.userInfo.isCompany |
| 138 | - console.log(userCode) | |
| 139 | - if (userCode.userInfo.userId === 'admin') { | |
| 140 | - this.isAdmin = true | |
| 141 | - } | |
| 138 | + let authorityID = userCode.permissionList | |
| 139 | + this.isAdmin = authorityID.some(it => it.modelId === '194684404600145157') | |
| 140 | + console.log('是否有公示公告和新闻信息权限',this.isAdmin) | |
| 142 | 141 | } else { |
| 143 | 142 | uni.showToast({ |
| 144 | 143 | title: '请登录', | ... | ... |
pages/newsDetail/newsDetail.vue
| ... | ... | @@ -114,7 +114,7 @@ import BASE_URL from '../../common/config.js' |
| 114 | 114 | let currentId = that.data |
| 115 | 115 | console.log(currentId) |
| 116 | 116 | that.API.getNewsDetail(currentId).then(res =>{ |
| 117 | - console.log(res) | |
| 117 | + console.log('返回res',res) | |
| 118 | 118 | let createTime = utils.formatTime(res.data.createTime) |
| 119 | 119 | res.data.createTime = createTime |
| 120 | 120 | that.detailData = res.data | ... | ... |
pages/notice/notice.vue
| ... | ... | @@ -46,9 +46,9 @@ |
| 46 | 46 | <view class="thumb" v-if="item.isImg"> |
| 47 | 47 | <image :src="baseUrl + item.imgUrl[0].url"></image> |
| 48 | 48 | </view> |
| 49 | - <view class="thumb" v-else> | |
| 49 | + <!-- <view class="thumb" v-else> | |
| 50 | 50 | <image src="../../static/img/img3.jpg"></image> |
| 51 | - </view> | |
| 51 | + </view> --> | |
| 52 | 52 | </view> |
| 53 | 53 | </view> |
| 54 | 54 | </view> |
| ... | ... | @@ -117,20 +117,20 @@ import utils from '../../service/utils'; |
| 117 | 117 | this.getNoticeList(this.categorrId) |
| 118 | 118 | }, |
| 119 | 119 | methods: { |
| 120 | - // 获取用户信息 | |
| 120 | + // 获取用户信息判断是否有公示公告和新闻信息发布的ID,权限判断authority = 194684404600145157 | |
| 121 | 121 | getUser(){ |
| 122 | 122 | if (uni.getStorageSync('user')) { |
| 123 | 123 | let userCode = uni.getStorageSync('user') |
| 124 | 124 | // console.log("用户的code", this.userCode) |
| 125 | - this.userId = userCode.userInfo.userId | |
| 126 | - this.userName = userCode.userInfo.userAccount | |
| 127 | - this.userIcon = userCode.userInfo.headIcon | |
| 128 | - this.organizeName = userCode.userInfo.organizeName | |
| 129 | - // this.isAdmin = userCode.userInfo.isCompany | |
| 125 | + // this.userId = userCode.userInfo.userId | |
| 126 | + // this.userName = userCode.userInfo.userAccount | |
| 127 | + // this.userIcon = userCode.userInfo.headIcon | |
| 128 | + // this.organizeName = userCode.userInfo.organizeName | |
| 129 | + let authorityID = userCode.permissionList | |
| 130 | + this.isAdmin = authorityID.some(it => it.modelId === '194684404600145157') | |
| 131 | + console.log('是否有公示公告和新闻信息权限',this.isAdmin) | |
| 130 | 132 | console.log(userCode) |
| 131 | - if(userCode.userInfo.userId === 'admin'){ | |
| 132 | - this.isAdmin = true | |
| 133 | - } | |
| 133 | + | |
| 134 | 134 | } else { |
| 135 | 135 | uni.showToast({ |
| 136 | 136 | title: '请登录', | ... | ... |
pages/official/grouping/grouping.vue
| 1 | 1 | <template> |
| 2 | 2 | <view class="page"> |
| 3 | - <qianziyu-select :show="show" type="radio" :popupTitle="popupTitle" name="cworkStationName" | |
| 4 | - :dataLists="dataLists" placeholder="输入工站名称搜索" @cancel="show=false" @search="selectSearch" @submit="" | |
| 5 | - </qianziyu-select> | |
| 3 | + <!-- 管理员看到的 --> | |
| 4 | + <view class="test"> | |
| 5 | + <view class="top"> | |
| 6 | + <view class="groupName"> | |
| 7 | + 当前分组 | |
| 8 | + </view> | |
| 9 | + <view class="nameTitle"> | |
| 10 | + {{groupName}} | |
| 11 | + </view> | |
| 12 | + </view> | |
| 13 | + <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> | |
| 14 | + <wyh-tree-select :items="items" :activeIds="city_ids5" :selectAll="true" :isSearch="true" | |
| 15 | + @getTypeCompanyList="getTypeCompanyList" /> | |
| 16 | + <view class="official"> | |
| 17 | + <view>已选<text class="official-num">{{city_ids5.length}}</text>家企业</view> | |
| 18 | + <!-- <radio :checked="check" @click="change">是否通知</radio> --> | |
| 19 | + <!-- <view class="official-btn" @click="toGrouping">自定义分组</view> --> | |
| 20 | + <view class="official-btn" @click="putComGroup()">确认</view> | |
| 21 | + </view> | |
| 22 | + </view> | |
| 6 | 23 | </view> |
| 7 | 24 | </template> |
| 8 | 25 | |
| 9 | 26 | <script> |
| 10 | - import qianziyuSelect from '@/components/qianziyu-select/qianziyu-select.vue' | |
| 27 | + import request from '@/utils/request.js' | |
| 28 | + import upLoad from '@/components/ncc/ncc-upload/index.vue' | |
| 11 | 29 | export default { |
| 30 | + computed: { | |
| 31 | + city_name5() { | |
| 32 | + return this.getCityNames(this.city_ids5); | |
| 33 | + }, | |
| 34 | + | |
| 35 | + }, | |
| 12 | 36 | components: { |
| 13 | - qianziyuSelect | |
| 37 | + upLoad | |
| 14 | 38 | }, |
| 15 | 39 | data() { |
| 16 | 40 | return { |
| 17 | - dataLists: [{ | |
| 18 | - "name": "测试数据1", | |
| 19 | - "id": "1", | |
| 20 | - "cid": "cid" | |
| 21 | - }, { | |
| 22 | - "name": "测试数据2", | |
| 23 | - "id": "2", | |
| 24 | - "cid": "cid" | |
| 25 | - }] | |
| 41 | + items: [], | |
| 42 | + city_ids5: [], | |
| 43 | + files: [], | |
| 44 | + // 上传的文件路径 | |
| 45 | + fileUrl: '', | |
| 46 | + uploadOptions: { | |
| 47 | + url: 'http://deyanggaoxin.fengshiyun.com/api/file/Uploader/1', // 不传入上传地址则返回本地链接 | |
| 48 | + // url: '', // 不传入上传地址则返回本地链接 | |
| 49 | + }, | |
| 50 | + check: false, | |
| 51 | + // 文件名 | |
| 52 | + fileName: '文件名', | |
| 53 | + // 当前用户ID: | |
| 54 | + userId: '', | |
| 55 | + isAdmin:false, | |
| 56 | + // 用户公司ID | |
| 57 | + companyId: '', | |
| 58 | + // 公文列表 | |
| 59 | + fileList: [], | |
| 60 | + isNull: false, | |
| 61 | + baseUrl: 'http://deyanggaoxin.fengshiyun.com', | |
| 62 | + // 新建分组名: | |
| 63 | + groupName:'', | |
| 64 | + // 新建分组code | |
| 65 | + groupCode:'', | |
| 66 | + groupId:'' | |
| 26 | 67 | } |
| 27 | 68 | }, |
| 28 | - | |
| 69 | + onLoad(options) { | |
| 70 | + // console.log('options',options) | |
| 71 | + this.groupId = JSON.parse(options.data) | |
| 72 | + this.groupName = JSON.parse(options.fullName) | |
| 73 | + console.log('groupId',this.groupId) | |
| 74 | + console.log('groupName',this.groupName) | |
| 75 | + }, | |
| 76 | + onShow() { | |
| 77 | + this.getUser() | |
| 78 | + if(this.isAdmin){ | |
| 79 | + this.getFileList() | |
| 80 | + }else{ | |
| 81 | + this.getTypeOfCompany() | |
| 82 | + this.getTypeCompanyList(null) | |
| 83 | + } | |
| 84 | + // this.getCompanyList() | |
| 85 | + // this.getTypeOfCompany() | |
| 86 | + }, | |
| 87 | + watch: { | |
| 88 | + | |
| 89 | + }, | |
| 29 | 90 | methods: { |
| 30 | - | |
| 91 | + // 添加企业到分组 | |
| 92 | + putComGroup(){ | |
| 93 | + let ids = this.city_ids5.join(",") | |
| 94 | + let query = { | |
| 95 | + group:this.groupId, | |
| 96 | + ids:ids | |
| 97 | + } | |
| 98 | + console.log('添加分组',query) | |
| 99 | + request({ | |
| 100 | + url:'https://www.dygxq-es.cn/api/permission/Organize/SetGroup?n=1709620981', | |
| 101 | + method:'post', | |
| 102 | + data:query | |
| 103 | + }).then(res=>{ | |
| 104 | + console.log('添加分组情况',res) | |
| 105 | + if(res.code == 200){ | |
| 106 | + uni.showToast({ | |
| 107 | + icon:'success', | |
| 108 | + title:"添加企业成功!" | |
| 109 | + }) | |
| 110 | + } | |
| 111 | + }) | |
| 112 | + }, | |
| 113 | + change() { | |
| 114 | + console.log('check', this.check) | |
| 115 | + this.check = !this.check | |
| 116 | + console.log('check', this.check) | |
| 117 | + }, | |
| 118 | + // 获取用户信息判断是否有表单设计和企业通知的ID,权限判断authority = 361476463456683269 | |
| 119 | + getUser() { | |
| 120 | + if (uni.getStorageSync('user')) { | |
| 121 | + let userCode = uni.getStorageSync('user') | |
| 122 | + // console.log("用户的code", this.userCode) | |
| 123 | + // this.userId = userCode.userInfo.userId | |
| 124 | + // this.userName = userCode.userInfo.userAccount | |
| 125 | + // this.userIcon = userCode.userInfo.headIcon | |
| 126 | + // this.organizeName = userCode.userInfo.organizeName | |
| 127 | + let authorityID = userCode.permissionList | |
| 128 | + this.isAdmin = userCode.userInfo.isCompany | |
| 129 | + // if(this.isAdmin && !userCode.userInfo.isCompany){ | |
| 130 | + // uni.showToast({ | |
| 131 | + // icon:"error", | |
| 132 | + // title:"您无该权限!" | |
| 133 | + // }) | |
| 134 | + // } | |
| 135 | + // console.log('是否有诉求管理权限',this.isAdmin) | |
| 136 | + console.log(userCode) | |
| 137 | + } else { | |
| 138 | + uni.showToast({ | |
| 139 | + title: '请登录', | |
| 140 | + icon: 'none' | |
| 141 | + }) | |
| 142 | + setTimeout(() => { | |
| 143 | + uni.reLaunch({ | |
| 144 | + url: '/pages/login/index' | |
| 145 | + }) | |
| 146 | + }) | |
| 147 | + } | |
| 148 | + }, | |
| 149 | + | |
| 150 | + // 跳转到自定义分组页面 | |
| 151 | + toGrouping() { | |
| 152 | + uni.navigateTo({ | |
| 153 | + url: '/pages/official/grouping/grouping' | |
| 154 | + }) | |
| 155 | + }, | |
| 156 | + // 获取企业分类 | |
| 157 | + getTypeOfCompany() { | |
| 158 | + request({ | |
| 159 | + url: '/api/system/DictionaryData/365138541614728453', | |
| 160 | + method: 'get', | |
| 161 | + data: {} | |
| 162 | + }).then(res => { | |
| 163 | + if (res.code == 200) { | |
| 164 | + console.log(res) | |
| 165 | + this.items = [] | |
| 166 | + this.items.push({ | |
| 167 | + text: "全部", | |
| 168 | + id: null, | |
| 169 | + children: [] | |
| 170 | + }) | |
| 171 | + console.log('item',this.items) | |
| 172 | + } else if (res.code == 600) { | |
| 173 | + uni.showToast({ | |
| 174 | + title: '请登录', | |
| 175 | + icon: 'none' | |
| 176 | + }) | |
| 177 | + } | |
| 178 | + }) | |
| 179 | + }, | |
| 180 | + // 根据分类获取企业列表 | |
| 181 | + getTypeCompanyList(id) { | |
| 182 | + request({ | |
| 183 | + url: 'https://www.dygxq-es.cn/api/permission/Organize/list?n=1709623341', | |
| 184 | + method: 'get', | |
| 185 | + data: { | |
| 186 | + pageSize: 1000, | |
| 187 | + groupId: id | |
| 188 | + } | |
| 189 | + }).then(res => { | |
| 190 | + console.log(res) | |
| 191 | + if (res.code == 200) { | |
| 192 | + let result = this.items.findIndex(it => it.id === id) | |
| 193 | + this.items[result].children = [] | |
| 194 | + console.log('下标', result) | |
| 195 | + let arr = res.data.list.map(it => { | |
| 196 | + return { | |
| 197 | + ...it, | |
| 198 | + text: it.fullName, | |
| 199 | + id: it.id, | |
| 200 | + type: false, | |
| 201 | + } | |
| 202 | + }) | |
| 203 | + this.items[result].children = arr | |
| 204 | + } | |
| 205 | + }) | |
| 206 | + }, | |
| 207 | + handleUploadClick() { | |
| 208 | + // 使用默认配置则不需要传入第二个参数 | |
| 209 | + type: ['image', 'video', 'file']; | |
| 210 | + this.$refs.XeUpload.upload('file', {}); | |
| 211 | + // this.$refs.XeUpload.upload('image', { | |
| 212 | + // count: 6, | |
| 213 | + // sizeType: ['original', 'compressed'], | |
| 214 | + // sourceType: ['album'], | |
| 215 | + // }); | |
| 216 | + }, | |
| 217 | + handleUploadCallback(e) { | |
| 218 | + // e.type: ['choose', 'success', 'warning'] | |
| 219 | + // choose 是options没有传入url,返回临时链接时触发 | |
| 220 | + // success 是上传成功返回对应的数据时触发 | |
| 221 | + // warning 上传或者选择文件失败触发 | |
| 222 | + // ...... | |
| 223 | + console.log(e) | |
| 224 | + this.fileUrl = e.data[0].response.data.url | |
| 225 | + this.fileName = e.data[0].name | |
| 226 | + | |
| 227 | + }, | |
| 228 | + onItem(res) { | |
| 229 | + console.log(res); | |
| 230 | + }, | |
| 31 | 231 | }, |
| 32 | 232 | } |
| 33 | 233 | </script> |
| 34 | 234 | |
| 35 | -<style lang="scss" scoped> | |
| 36 | - .main-box { | |
| 37 | - display: flex; | |
| 38 | - margin: 20rpx; | |
| 39 | - justify-content: space-between; | |
| 40 | - background: #f7f7f7; | |
| 41 | - padding: 30rpx; | |
| 42 | - } | |
| 235 | +<style scoped lang="scss"> | |
| 236 | + @import 'official.scss'; | |
| 43 | 237 | </style> |
| 44 | 238 | \ No newline at end of file | ... | ... |
pages/official/grouping/official.scss
0 → 100644
| 1 | +.official { | |
| 2 | + display: flex; | |
| 3 | + align-items: center; | |
| 4 | + justify-content: space-between; | |
| 5 | + background-color: #fff; | |
| 6 | + box-shadow: 0 -10rpx 20rpx 0 #efefef; | |
| 7 | + height: 120rpx; | |
| 8 | + width: 100%; | |
| 9 | + padding: 20rpx; | |
| 10 | + border-radius: 20rpx 20rpx 0 0; | |
| 11 | + position: fixed; | |
| 12 | + bottom: 0; | |
| 13 | + .official-btn { | |
| 14 | + background-color: #E60012; | |
| 15 | + color: #fff; | |
| 16 | + font-size: 20rpx; | |
| 17 | + border-radius: 100rpx; | |
| 18 | + padding: 0 50rpx; | |
| 19 | + height: 70rpx; | |
| 20 | + line-height: 70rpx; | |
| 21 | + } | |
| 22 | + .official-num { | |
| 23 | + color: #E60012; | |
| 24 | + font-weight: bold; | |
| 25 | + } | |
| 26 | +} | |
| 27 | +.page1{ | |
| 28 | + width: 100%; | |
| 29 | + height: 100vh; | |
| 30 | + background-color: #f4f4f4; | |
| 31 | + .fileName{ | |
| 32 | + width: 400rpx; | |
| 33 | + white-space: nowrap; | |
| 34 | + text-overflow: ellipsis; | |
| 35 | + overflow: hidden; | |
| 36 | + } | |
| 37 | + .item { | |
| 38 | + display: flex; | |
| 39 | + justify-content: space-between; | |
| 40 | + align-items: center; | |
| 41 | + background-color: #ffffff; | |
| 42 | + border-radius: 20rpx; | |
| 43 | + height: 80rpx; | |
| 44 | + margin-top: 30rpx; | |
| 45 | + | |
| 46 | + button { | |
| 47 | + height: 60rpx; | |
| 48 | + text-align: center; | |
| 49 | + line-height: 60rpx; | |
| 50 | + margin: 0; | |
| 51 | + font-size: 20rpx; | |
| 52 | + margin-right: 30rpx; | |
| 53 | + } | |
| 54 | + } | |
| 55 | + } | |
| 56 | + .top{ | |
| 57 | + width: 90%; | |
| 58 | + margin: 0 auto; | |
| 59 | + display: flex; | |
| 60 | + justify-content: space-between; | |
| 61 | + margin-top: 20rpx; | |
| 62 | + font-size: 30rpx; | |
| 63 | + .nameTitle{ | |
| 64 | + font-weight: bold; | |
| 65 | + } | |
| 66 | + } | |
| 67 | + | |
| 0 | 68 | \ No newline at end of file | ... | ... |
pages/official/newGroup/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 | +} | |
| 188 | +.lieBiao{ | |
| 189 | + display: flex; | |
| 190 | + align-items: center; | |
| 191 | + justify-content: space-between; | |
| 192 | + margin-top: 20rpx; | |
| 193 | + .lef{ | |
| 194 | + display: flex; | |
| 195 | + margin-right: 20rpx; | |
| 196 | + } | |
| 197 | + .groupName{ | |
| 198 | + margin-left: 20rpx; | |
| 199 | + } | |
| 200 | + .groupCode{ | |
| 201 | + text-align: right; | |
| 202 | + } | |
| 203 | +} | ... | ... |
pages/official/newGroup/newGroup.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="page"> | |
| 3 | + <!-- 反馈内容 --> | |
| 4 | + <view class="feedback-data" style="padding-bottom: 15rpx;"> | |
| 5 | + <view class="titleall-box"> | |
| 6 | + <view class="titleall-left"> | |
| 7 | + <view class="titleall-left-line"></view>当前分组列表 | |
| 8 | + </view> | |
| 9 | + </view> | |
| 10 | + <view class="lieBiao" v-for="(it,index) in lieBiao" :key="index"> | |
| 11 | + <view class="groupName"> | |
| 12 | + {{it.fullName}} | |
| 13 | + </view> | |
| 14 | + <view class="groupCode"> | |
| 15 | + {{it.enCode}} | |
| 16 | + </view> | |
| 17 | + <view class="lef"> | |
| 18 | + <button type="primary" style="margin-right: 10rpx;" size="mini" @click="toGrouping(it.id,it.fullName)">添加企业</button> | |
| 19 | + <button type="warn" size="mini" @click="delIt(it.id)">删除</button> | |
| 20 | + </view> | |
| 21 | + </view> | |
| 22 | + </view> | |
| 23 | + <!-- 反馈内容 --> | |
| 24 | + <view class="feedback-data" style="padding-bottom: 15rpx;"> | |
| 25 | + <view class="titleall-box"> | |
| 26 | + <view class="titleall-left"> | |
| 27 | + <view class="titleall-left-line"></view>填写分组信息 | |
| 28 | + </view> | |
| 29 | + </view> | |
| 30 | + <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" style="width: 96%;margin: 0 auto;"> | |
| 31 | + <uni-forms-item label="组名" required name="title"> | |
| 32 | + <uni-easyinput v-model="valiFormData.title" placeholder="请输入组名" /> | |
| 33 | + </uni-forms-item> | |
| 34 | + <uni-forms-item label="分组编码" required name="subTitle"> | |
| 35 | + <uni-easyinput v-model="valiFormData.subTitle" placeholder="请输入分组编码" /> | |
| 36 | + </uni-forms-item> | |
| 37 | + </uni-forms> | |
| 38 | + <view class="submit-btn" @click="submitContent('valiForm')"> | |
| 39 | + <text>确定新建分组</text> | |
| 40 | + </view> | |
| 41 | + </view> | |
| 42 | + | |
| 43 | + <!-- 提交 --> | |
| 44 | + | |
| 45 | + </view> | |
| 46 | +</template> | |
| 47 | + | |
| 48 | +<script> | |
| 49 | + import { | |
| 50 | + data | |
| 51 | + } from '../../../uview-ui/libs/mixin/mixin'; | |
| 52 | + import request from '@/utils/request.js' | |
| 53 | + import utils from '../../../service/utils'; | |
| 54 | + export default { | |
| 55 | + data() { | |
| 56 | + return { | |
| 57 | + userCode: {}, | |
| 58 | + // 选择图片路径 | |
| 59 | + filePath: [], | |
| 60 | + uploadPath: [], | |
| 61 | + type: "", | |
| 62 | + lastModifyUserId: '', | |
| 63 | + // 校验表单数据 | |
| 64 | + valiFormData: { | |
| 65 | + title: '', | |
| 66 | + bodyContent: '', | |
| 67 | + subTitle: '', | |
| 68 | + }, | |
| 69 | + // 通知信息标题 | |
| 70 | + noticeTitle:'', | |
| 71 | + // 通知详情 | |
| 72 | + noticeDesc:'', | |
| 73 | + creater: '', | |
| 74 | + rules: { | |
| 75 | + title: { | |
| 76 | + rules: [{ | |
| 77 | + required: true, | |
| 78 | + errorMessage: '不能为空' | |
| 79 | + }] | |
| 80 | + }, | |
| 81 | + subTitle: { | |
| 82 | + rules: [{ | |
| 83 | + required: true, | |
| 84 | + errorMessage: '不能为空' | |
| 85 | + }] | |
| 86 | + }, | |
| 87 | + }, | |
| 88 | + baseUrl: "http://deyanggaoxin.fengshiyun.com", | |
| 89 | + // 判断是否传了id | |
| 90 | + isId: '', | |
| 91 | + have: false, | |
| 92 | + detailData: [], | |
| 93 | + // 需要通知的公司的id | |
| 94 | + companysId: [], | |
| 95 | + tellInfo:[], | |
| 96 | + // 当前分组列表 | |
| 97 | + lieBiao:[], | |
| 98 | + }; | |
| 99 | + | |
| 100 | + }, | |
| 101 | + // onShow() { | |
| 102 | + // this.getType() | |
| 103 | + // }, | |
| 104 | + onUnload() { | |
| 105 | + uni.$off('idInfo') | |
| 106 | + uni.$off('tellInfo') | |
| 107 | + }, | |
| 108 | + onShow() { | |
| 109 | + this.getTypeOfCompany() | |
| 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 | + toTellInfo() { | |
| 143 | + uni.navigateTo({ | |
| 144 | + url: '/pages/tellInfo/tellInfo' | |
| 145 | + }) | |
| 146 | + }, | |
| 147 | + // 获取用户信息 | |
| 148 | + getUser() { | |
| 149 | + if (uni.getStorageSync('user')) { | |
| 150 | + this.userCode = uni.getStorageSync('user').userInfo | |
| 151 | + // this.userInfo = this.userCode.userAccount | |
| 152 | + // this.userInfo = '123456' | |
| 153 | + console.log('用户已登录!', this.userCode) | |
| 154 | + } else { | |
| 155 | + uni.showToast({ | |
| 156 | + title: '请登录', | |
| 157 | + icon: 'none' | |
| 158 | + }) | |
| 159 | + setTimeout(() => { | |
| 160 | + uni.reLaunch({ | |
| 161 | + url: '/pages/login/index' | |
| 162 | + }) | |
| 163 | + }) | |
| 164 | + } | |
| 165 | + }, | |
| 166 | + // 获取企业分类 | |
| 167 | + getTypeOfCompany() { | |
| 168 | + request({ | |
| 169 | + url: 'https://www.dygxq-es.cn/api/system/DictionaryData/365138541614728453?n=1709621749&keyword=&isTree=1', | |
| 170 | + method: 'get', | |
| 171 | + data: {} | |
| 172 | + }).then(res => { | |
| 173 | + if (res.code == 200) { | |
| 174 | + console.log(res) | |
| 175 | + this.lieBiao = res.data.list | |
| 176 | + console.log('lieBiao',this.lieBiao) | |
| 177 | + } else if (res.code == 600) { | |
| 178 | + uni.showToast({ | |
| 179 | + title: '请登录', | |
| 180 | + icon: 'none' | |
| 181 | + }) | |
| 182 | + } | |
| 183 | + }) | |
| 184 | + }, | |
| 185 | + // 提交内容 | |
| 186 | + submitContent(ref) { | |
| 187 | + let that = this | |
| 188 | + let query = { | |
| 189 | + description: "", | |
| 190 | + dictionaryTypeId: "365138541614728453", | |
| 191 | + enCode: this.valiFormData.subTitle, | |
| 192 | + enabledMark: 1, | |
| 193 | + fullName: this.valiFormData.title, | |
| 194 | + id: "", | |
| 195 | + images: [], | |
| 196 | + logo: [], | |
| 197 | + parentId: "0", | |
| 198 | + sortCode: 0, | |
| 199 | + } | |
| 200 | + console.log('query',query) | |
| 201 | + request({ | |
| 202 | + url:'https://www.dygxq-es.cn/api/system/DictionaryData?n=1709622056', | |
| 203 | + method:'post', | |
| 204 | + data:query | |
| 205 | + }).then(res=>{ | |
| 206 | + if(res.code == 200){ | |
| 207 | + this.getTypeOfCompany() | |
| 208 | + uni.showToast({ | |
| 209 | + icon:"success", | |
| 210 | + title:'新建分组成功', | |
| 211 | + duration:1500 | |
| 212 | + }) | |
| 213 | + } | |
| 214 | + }) | |
| 215 | + }, | |
| 216 | + // 删除该分组 | |
| 217 | + delIt(id){ | |
| 218 | + console.log("id",id) | |
| 219 | + uni.showModal({ | |
| 220 | + title:"是否删除该分组", | |
| 221 | + success: (res) => { | |
| 222 | + if(res.confirm){ | |
| 223 | + request({ | |
| 224 | + url:`https://www.dygxq-es.cn/api/system/DictionaryData/${id}?n=1709622362`, | |
| 225 | + method:'delete', | |
| 226 | + data:{} | |
| 227 | + }).then(res=>{ | |
| 228 | + uni.showToast({ | |
| 229 | + icon:'success', | |
| 230 | + title:'删除成功!', | |
| 231 | + duration:1000 | |
| 232 | + }).then(()=>{ | |
| 233 | + this.getTypeOfCompany() | |
| 234 | + }) | |
| 235 | + }) | |
| 236 | + } | |
| 237 | + } | |
| 238 | + }) | |
| 239 | + }, | |
| 240 | + // 跳转到企业分组页面 | |
| 241 | + toGrouping(id,fullName){ | |
| 242 | + uni.navigateTo({ | |
| 243 | + url:'/pages/official/grouping/grouping?' + `data=${JSON.stringify(id)}` + `&fullName=${JSON.stringify(fullName)}` | |
| 244 | + }) | |
| 245 | + } | |
| 246 | + // /** | |
| 247 | + // * 反馈类型 | |
| 248 | + // * @param {Object} | |
| 249 | + // */ | |
| 250 | + // FeedbackTypeCh(val) { | |
| 251 | + // console.log(val); | |
| 252 | + // this.TypeIndex = val.detail.value; | |
| 253 | + // } | |
| 254 | + // 进行通知 | |
| 255 | + }, | |
| 256 | + } | |
| 257 | +</script> | |
| 258 | + | |
| 259 | +<style scoped lang="scss"> | |
| 260 | + @import 'Feedback.scss'; | |
| 261 | + .more-content{ | |
| 262 | + display: flex; | |
| 263 | + align-items: center; | |
| 264 | + image{ | |
| 265 | + width: 100rpx; | |
| 266 | + height: 100rpx; | |
| 267 | + border-radius: 100%; | |
| 268 | + } | |
| 269 | + .more-content-img { | |
| 270 | + image { | |
| 271 | + width: 24rpx; | |
| 272 | + height: 24rpx; | |
| 273 | + } | |
| 274 | + } | |
| 275 | + } | |
| 276 | +</style> | |
| 0 | 277 | \ No newline at end of file | ... | ... |
pages/official/official.vue
| 1 | 1 | <template> |
| 2 | 2 | <view class="page"> |
| 3 | 3 | <!-- 管理员看到的 --> |
| 4 | - <view class="test" v-if="isAdmin"> | |
| 4 | + <view class="test" v-if="!isAdmin"> | |
| 5 | 5 | <!-- <uni-file-picker |
| 6 | 6 | v-model="files" |
| 7 | 7 | fileMediatype="all" |
| ... | ... | @@ -26,9 +26,9 @@ |
| 26 | 26 | <wyh-tree-select :items="items" :activeIds="city_ids5" :selectAll="true" :isSearch="true" |
| 27 | 27 | @getTypeCompanyList="getTypeCompanyList" /> |
| 28 | 28 | <view class="official"> |
| 29 | - <view>已选<text class="official-num">{{city_ids5.length}}</text>家企业</view> | |
| 30 | - <radio :checked="check" @click="change">是否通知</radio> | |
| 31 | - <view class="official-btn" @click="toGrouping">自定义分组</view> | |
| 29 | + <view style="font-size: 25rpx;">已选<text class="official-num">{{city_ids5.length}}</text>家企业</view> | |
| 30 | + <radio style="font-size: 25rpx;" :checked="check" @click="change">是否通知</radio> | |
| 31 | + <view class="official-btn" @click="toGrouping">新建分组和列表</view> | |
| 32 | 32 | <view class="official-btn" @click="send">确认发送</view> |
| 33 | 33 | </view> |
| 34 | 34 | </view> |
| ... | ... | @@ -93,11 +93,11 @@ |
| 93 | 93 | }, |
| 94 | 94 | onShow() { |
| 95 | 95 | this.getUser() |
| 96 | - if(!this.isAdmin){ | |
| 96 | + if(this.isAdmin){ | |
| 97 | 97 | this.getFileList() |
| 98 | 98 | }else{ |
| 99 | 99 | this.getTypeOfCompany() |
| 100 | - this.getTypeCompanyList('365139048618001669') | |
| 100 | + this.getTypeCompanyList(null) | |
| 101 | 101 | } |
| 102 | 102 | // this.getCompanyList() |
| 103 | 103 | // this.getTypeOfCompany() |
| ... | ... | @@ -111,18 +111,24 @@ |
| 111 | 111 | this.check = !this.check |
| 112 | 112 | console.log('check', this.check) |
| 113 | 113 | }, |
| 114 | - // 获取用户信息 | |
| 114 | + // 获取用户信息判断是否有表单设计和企业通知的ID,权限判断authority = 361476463456683269 | |
| 115 | 115 | getUser() { |
| 116 | 116 | if (uni.getStorageSync('user')) { |
| 117 | 117 | let userCode = uni.getStorageSync('user') |
| 118 | 118 | // console.log("用户的code", this.userCode) |
| 119 | - this.userId = userCode.userInfo.userId | |
| 120 | - this.userName = userCode.userInfo.userAccount | |
| 121 | - this.userIcon = userCode.userInfo.headIcon | |
| 122 | - this.organizeName = userCode.userInfo.organizeName | |
| 123 | - if (this.userId === 'admin') { | |
| 124 | - this.isAdmin = true | |
| 125 | - } | |
| 119 | + // this.userId = userCode.userInfo.userId | |
| 120 | + // this.userName = userCode.userInfo.userAccount | |
| 121 | + // this.userIcon = userCode.userInfo.headIcon | |
| 122 | + // this.organizeName = userCode.userInfo.organizeName | |
| 123 | + let authorityID = userCode.permissionList | |
| 124 | + this.isAdmin = userCode.userInfo.isCompany | |
| 125 | + // if(this.isAdmin && !userCode.userInfo.isCompany){ | |
| 126 | + // uni.showToast({ | |
| 127 | + // icon:"error", | |
| 128 | + // title:"您无该权限!" | |
| 129 | + // }) | |
| 130 | + // } | |
| 131 | + // console.log('是否有诉求管理权限',this.isAdmin) | |
| 126 | 132 | console.log(userCode) |
| 127 | 133 | } else { |
| 128 | 134 | uni.showToast({ |
| ... | ... | @@ -140,19 +146,24 @@ |
| 140 | 146 | // 跳转到自定义分组页面 |
| 141 | 147 | toGrouping() { |
| 142 | 148 | uni.navigateTo({ |
| 143 | - url: '/pages/official/grouping/grouping' | |
| 149 | + url: '/pages/official/newGroup/newGroup' | |
| 144 | 150 | }) |
| 145 | 151 | }, |
| 146 | 152 | // 获取企业分类 |
| 147 | 153 | getTypeOfCompany() { |
| 148 | 154 | request({ |
| 149 | - url: '/api/system/DictionaryData/365138541614728453', | |
| 155 | + url: 'https://www.dygxq-es.cn/api/system/DictionaryData/365138541614728453?n=1709621749&keyword=&isTree=1', | |
| 150 | 156 | method: 'get', |
| 151 | 157 | data: {} |
| 152 | 158 | }).then(res => { |
| 153 | 159 | if (res.code == 200) { |
| 154 | 160 | console.log(res) |
| 155 | 161 | this.items = [] |
| 162 | + this.items.push({ | |
| 163 | + text: "全部", | |
| 164 | + id: null, | |
| 165 | + children: [] | |
| 166 | + }) | |
| 156 | 167 | for (let i = 0; i < res.data.list.length; i++) { |
| 157 | 168 | this.items.push({ |
| 158 | 169 | text: res.data.list[i].fullName, |
| ... | ... | @@ -160,7 +171,8 @@ |
| 160 | 171 | children: [] |
| 161 | 172 | }) |
| 162 | 173 | } |
| 163 | - console.log(this.items) | |
| 174 | + | |
| 175 | + console.log('item',this.items) | |
| 164 | 176 | } else if (res.code == 600) { |
| 165 | 177 | uni.showToast({ |
| 166 | 178 | title: '请登录', |
| ... | ... | @@ -172,7 +184,7 @@ |
| 172 | 184 | // 根据分类获取企业列表 |
| 173 | 185 | getTypeCompanyList(id) { |
| 174 | 186 | request({ |
| 175 | - url: '/api/permission/organize/list', | |
| 187 | + url: 'https://www.dygxq-es.cn/api/permission/Organize/list?n=1709623341', | |
| 176 | 188 | method: 'get', |
| 177 | 189 | data: { |
| 178 | 190 | pageSize: 1000, | ... | ... |
pages/policy/policy.vue
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | that.getPolicyList() |
| 114 | 114 | }, |
| 115 | 115 | methods: { |
| 116 | - // 获取用户信息 | |
| 116 | + // 获取用户信息判断是否有政策法规发布的ID,权限判断authority = 396297481161278725 | |
| 117 | 117 | getUser() { |
| 118 | 118 | if (uni.getStorageSync('user')) { |
| 119 | 119 | let userCode = uni.getStorageSync('user') |
| ... | ... | @@ -123,10 +123,9 @@ |
| 123 | 123 | this.userIcon = userCode.userInfo.headIcon |
| 124 | 124 | this.organizeName = userCode.userInfo.organizeName |
| 125 | 125 | // this.isAdmin = userCode.userInfo.isCompany |
| 126 | - console.log(userCode) | |
| 127 | - if (userCode.userInfo.userId === 'admin') { | |
| 128 | - this.isAdmin = true | |
| 129 | - } | |
| 126 | + let authorityID = userCode.permissionList | |
| 127 | + this.isAdmin = authorityID.some(it => it.modelId === '396297481161278725') | |
| 128 | + console.log('是否有政策法规发布权限',this.isAdmin) | |
| 130 | 129 | } else { |
| 131 | 130 | uni.showToast({ |
| 132 | 131 | title: '请登录', | ... | ... |
pages/postCompany/postCompany.vue
| ... | ... | @@ -329,7 +329,8 @@ import utils from '../../service/utils'; |
| 329 | 329 | console.log("上传后的值", res) |
| 330 | 330 | uni.showToast({ |
| 331 | 331 | icon: "success", |
| 332 | - title: "发布成功!" | |
| 332 | + title: "发布成功!", | |
| 333 | + duration:1500 | |
| 333 | 334 | }).then(()=>{ |
| 334 | 335 | uni.navigateTo({ |
| 335 | 336 | url:'/pages/datain/datain' | ... | ... |
pages/postCon/postCon.vue
| ... | ... | @@ -14,19 +14,24 @@ |
| 14 | 14 | <uni-forms-item label="摘要" required name="subTitle"> |
| 15 | 15 | <uni-easyinput v-model="valiFormData.subTitle" placeholder="请输入" /> |
| 16 | 16 | </uni-forms-item> |
| 17 | - <uni-forms-item label="党的建设详细内容"> | |
| 17 | + <uni-forms-item label="详细内容"> | |
| 18 | 18 | <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入" /> |
| 19 | 19 | </uni-forms-item> |
| 20 | 20 | </uni-forms> |
| 21 | 21 | <view class="example-body"> |
| 22 | 22 | <uni-file-picker limit="9" @select="select" title="信息图片"></uni-file-picker> |
| 23 | 23 | </view> |
| 24 | - <view class="isNotice"> | |
| 24 | + <view class="isNotice" style="display: flex; align-items: center; margin-top: 20rpx;justify-content: space-between;" > | |
| 25 | 25 | <view class="lef" style="margin-left: 30rpx;"> |
| 26 | 26 | 已选择<span>{{companysId.length}}</span>家企业 |
| 27 | 27 | </view> |
| 28 | - <view class="rig"> | |
| 29 | - <button type="primary" @click="toTellInfo()" style="border-radius: 40rpx;">通知信息填写</button> | |
| 28 | + <view class="rig" @click="toTellInfo()" style="display: flex;align-items: center;"> | |
| 29 | + <text>选择企业</text> | |
| 30 | + <view class="more-content"> | |
| 31 | + <view class="more-content-img"> | |
| 32 | + <image src="../../static/right2.png"></image> | |
| 33 | + </view> | |
| 34 | + </view> | |
| 30 | 35 | </view> |
| 31 | 36 | </view> |
| 32 | 37 | </view> |
| ... | ... | @@ -336,4 +341,19 @@ |
| 336 | 341 | |
| 337 | 342 | <style scoped lang="scss"> |
| 338 | 343 | @import 'Feedback.scss'; |
| 344 | + .more-content{ | |
| 345 | + display: flex; | |
| 346 | + align-items: center; | |
| 347 | + image{ | |
| 348 | + width: 100rpx; | |
| 349 | + height: 100rpx; | |
| 350 | + border-radius: 100%; | |
| 351 | + } | |
| 352 | + .more-content-img { | |
| 353 | + image { | |
| 354 | + width: 24rpx; | |
| 355 | + height: 24rpx; | |
| 356 | + } | |
| 357 | + } | |
| 358 | + } | |
| 339 | 359 | </style> |
| 340 | 360 | \ No newline at end of file | ... | ... |
pages/postDemand/postDemand.vue
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <view class="feedback-data"> |
| 5 | 5 | <view class="titleall-box"> |
| 6 | 6 | <view class="titleall-left"> |
| 7 | - <view class="titleall-left-line"></view>填写产品信息 | |
| 7 | + <view class="titleall-left-line"></view>填写需求信息 | |
| 8 | 8 | </view> |
| 9 | 9 | </view> |
| 10 | 10 | <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" style="width: 96%;margin: 0 auto;"> |
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <uni-forms-item label="联系电话" required name="phone"> |
| 18 | 18 | <uni-easyinput v-model="valiFormData.phone" placeholder="请输入电话号码" /> |
| 19 | 19 | </uni-forms-item> |
| 20 | - <uni-forms-item label="需求详细内容"> | |
| 20 | + <uni-forms-item label="详细内容"> | |
| 21 | 21 | <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入详细产品介绍" /> |
| 22 | 22 | </uni-forms-item> |
| 23 | 23 | </uni-forms> | ... | ... |
pages/postNews/postNews.vue
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <uni-forms-item label="摘要" required name="subTitle"> |
| 15 | 15 | <uni-easyinput v-model="valiFormData.subTitle" placeholder="请输入" /> |
| 16 | 16 | </uni-forms-item> |
| 17 | - <uni-forms-item label="新闻详细内容"> | |
| 17 | + <uni-forms-item label="详细内容"> | |
| 18 | 18 | <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入" /> |
| 19 | 19 | </uni-forms-item> |
| 20 | 20 | </uni-forms> |
| ... | ... | @@ -38,12 +38,17 @@ |
| 38 | 38 | </view> |
| 39 | 39 | </view> |
| 40 | 40 | </view> |
| 41 | - <view class="isNotice"> | |
| 41 | + <view class="isNotice" style="display: flex; align-items: center; margin-top: 20rpx;justify-content: space-between;"> | |
| 42 | 42 | <view class="lef" style="margin-left: 30rpx;"> |
| 43 | 43 | 已选择<span>{{companysId.length}}</span>家企业 |
| 44 | 44 | </view> |
| 45 | - <view class="rig"> | |
| 46 | - <button type="primary" @click="toTellInfo()" style="border-radius: 40rpx;">通知</button> | |
| 45 | + <view class="rig" @click="toTellInfo()" style="display: flex;align-items: center;"> | |
| 46 | + <text>选择企业</text> | |
| 47 | + <view class="more-content"> | |
| 48 | + <view class="more-content-img"> | |
| 49 | + <image src="../../static/right2.png"></image> | |
| 50 | + </view> | |
| 51 | + </view> | |
| 47 | 52 | </view> |
| 48 | 53 | </view> |
| 49 | 54 | </view> |
| ... | ... | @@ -363,4 +368,19 @@ import utils from '../../service/utils'; |
| 363 | 368 | |
| 364 | 369 | <style scoped lang="scss"> |
| 365 | 370 | @import 'Feedback.scss'; |
| 371 | + .more-content{ | |
| 372 | + display: flex; | |
| 373 | + align-items: center; | |
| 374 | + image{ | |
| 375 | + width: 100rpx; | |
| 376 | + height: 100rpx; | |
| 377 | + border-radius: 100%; | |
| 378 | + } | |
| 379 | + .more-content-img { | |
| 380 | + image { | |
| 381 | + width: 24rpx; | |
| 382 | + height: 24rpx; | |
| 383 | + } | |
| 384 | + } | |
| 385 | + } | |
| 366 | 386 | </style> |
| 367 | 387 | \ No newline at end of file | ... | ... |
pages/postNotice/postNotice.vue
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <view class="feedback-data"> |
| 5 | 5 | <view class="titleall-box"> |
| 6 | 6 | <view class="titleall-left"> |
| 7 | - <view class="titleall-left-line"></view>填写公式公告信息 | |
| 7 | + <view class="titleall-left-line"></view>填写公示公告信息 | |
| 8 | 8 | </view> |
| 9 | 9 | </view> |
| 10 | 10 | <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" style="width: 96%;margin: 0 auto;"> |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <uni-forms-item label="摘要" required name="subTitle"> |
| 15 | 15 | <uni-easyinput v-model="valiFormData.subTitle" placeholder="请输入" /> |
| 16 | 16 | </uni-forms-item> |
| 17 | - <uni-forms-item label="公式公告详细内容"> | |
| 17 | + <uni-forms-item label="详细内容"> | |
| 18 | 18 | <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入" /> |
| 19 | 19 | </uni-forms-item> |
| 20 | 20 | </uni-forms> |
| ... | ... | @@ -38,12 +38,17 @@ |
| 38 | 38 | </view> |
| 39 | 39 | </view> |
| 40 | 40 | </view> |
| 41 | - <view class="isNotice"> | |
| 41 | + <view class="isNotice" style="display: flex; align-items: center; margin-top: 20rpx;justify-content: space-between;"> | |
| 42 | 42 | <view class="lef" style="margin-left: 30rpx;"> |
| 43 | 43 | 已选择<span>{{companysId.length}}</span>家企业 |
| 44 | 44 | </view> |
| 45 | - <view class="rig"> | |
| 46 | - <button type="primary" @click="toTellInfo()" style="border-radius: 40rpx;">通知</button> | |
| 45 | + <view class="rig" @click="toTellInfo()" style="display: flex;align-items: center;"> | |
| 46 | + <text>选择企业</text> | |
| 47 | + <view class="more-content"> | |
| 48 | + <view class="more-content-img"> | |
| 49 | + <image src="../../static/right2.png"></image> | |
| 50 | + </view> | |
| 51 | + </view> | |
| 47 | 52 | </view> |
| 48 | 53 | </view> |
| 49 | 54 | </view> |
| ... | ... | @@ -365,4 +370,19 @@ import utils from '../../service/utils'; |
| 365 | 370 | |
| 366 | 371 | <style scoped lang="scss"> |
| 367 | 372 | @import 'Feedback.scss'; |
| 373 | + .more-content{ | |
| 374 | + display: flex; | |
| 375 | + align-items: center; | |
| 376 | + image{ | |
| 377 | + width: 100rpx; | |
| 378 | + height: 100rpx; | |
| 379 | + border-radius: 100%; | |
| 380 | + } | |
| 381 | + .more-content-img { | |
| 382 | + image { | |
| 383 | + width: 24rpx; | |
| 384 | + height: 24rpx; | |
| 385 | + } | |
| 386 | + } | |
| 387 | + } | |
| 368 | 388 | </style> |
| 369 | 389 | \ No newline at end of file | ... | ... |
pages/postPolicy/postPolicy.vue
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <uni-forms-item label="摘要" required name="subTitle"> |
| 15 | 15 | <uni-easyinput v-model="valiFormData.subTitle" placeholder="请输入" /> |
| 16 | 16 | </uni-forms-item> |
| 17 | - <uni-forms-item label="政策法规详细内容"> | |
| 17 | + <uni-forms-item label="详细内容"> | |
| 18 | 18 | <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入" /> |
| 19 | 19 | </uni-forms-item> |
| 20 | 20 | </uni-forms> |
| ... | ... | @@ -55,12 +55,17 @@ |
| 55 | 55 | </view> |
| 56 | 56 | </view> |
| 57 | 57 | </view> |
| 58 | - <view class="isNotice"> | |
| 58 | + <view class="isNotice" style="display: flex; align-items: center; margin-top: 20rpx;justify-content: space-between;"> | |
| 59 | 59 | <view class="lef" style="margin-left: 30rpx;"> |
| 60 | 60 | 已选择<span>{{companysId.length}}</span>家企业 |
| 61 | 61 | </view> |
| 62 | - <view class="rig"> | |
| 63 | - <button type="primary" @click="toTellInfo()" style="border-radius: 40rpx;">通知</button> | |
| 62 | + <view class="rig" @click="toTellInfo()" style="display: flex;align-items: center;"> | |
| 63 | + <text>选择企业</text> | |
| 64 | + <view class="more-content"> | |
| 65 | + <view class="more-content-img"> | |
| 66 | + <image src="../../static/right2.png"></image> | |
| 67 | + </view> | |
| 68 | + </view> | |
| 64 | 69 | </view> |
| 65 | 70 | </view> |
| 66 | 71 | </view> |
| ... | ... | @@ -392,4 +397,19 @@ import utils from '../../service/utils'; |
| 392 | 397 | |
| 393 | 398 | <style scoped lang="scss"> |
| 394 | 399 | @import 'Feedback.scss'; |
| 400 | + .more-content{ | |
| 401 | + display: flex; | |
| 402 | + align-items: center; | |
| 403 | + image{ | |
| 404 | + width: 100rpx; | |
| 405 | + height: 100rpx; | |
| 406 | + border-radius: 100%; | |
| 407 | + } | |
| 408 | + .more-content-img { | |
| 409 | + image { | |
| 410 | + width: 24rpx; | |
| 411 | + height: 24rpx; | |
| 412 | + } | |
| 413 | + } | |
| 414 | + } | |
| 395 | 415 | </style> |
| 396 | 416 | \ No newline at end of file | ... | ... |
pages/postProduct/postProduct.vue
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <uni-forms-item label="产品简介"> |
| 15 | 15 | <uni-easyinput type="textarea" v-model="valiFormData.remark" placeholder="请输入产品简介" /> |
| 16 | 16 | </uni-forms-item> |
| 17 | - <uni-forms-item label="产品详细介绍"> | |
| 17 | + <uni-forms-item label="详细介绍"> | |
| 18 | 18 | <uni-easyinput type="textarea" v-model="valiFormData.bodyContent" placeholder="请输入详细产品介绍" /> |
| 19 | 19 | </uni-forms-item> |
| 20 | 20 | </uni-forms> | ... | ... |
pages/postTalent/postTalent.vue
| ... | ... | @@ -63,6 +63,26 @@ |
| 63 | 63 | this.creater = userinfo.userInfo.userId |
| 64 | 64 | }, |
| 65 | 65 | methods: { |
| 66 | + // 获取用户信息 | |
| 67 | + getUser() { | |
| 68 | + if (uni.getStorageSync('user')) { | |
| 69 | + // this.userCode = uni.getStorageSync('user').data.user.userInfo | |
| 70 | + // this.userInfo = this.userCode.userAccount | |
| 71 | + // this.userInfo = '123456' | |
| 72 | + console.log('用户已登录!') | |
| 73 | + } else { | |
| 74 | + uni.showToast({ | |
| 75 | + title: '请登录', | |
| 76 | + icon: 'none', | |
| 77 | + duration:1500 | |
| 78 | + }) | |
| 79 | + setTimeout(() => { | |
| 80 | + uni.reLaunch({ | |
| 81 | + url: '/pages/login/index' | |
| 82 | + }) | |
| 83 | + }) | |
| 84 | + } | |
| 85 | + }, | |
| 66 | 86 | // 表单校验与提交 |
| 67 | 87 | submit(ref) { |
| 68 | 88 | this.$refs[ref].validate().then(res => { | ... | ... |
pages/recommend/postRecommend/Feedback.scss
| ... | ... | @@ -188,4 +188,19 @@ |
| 188 | 188 | .uni-forms-item{ |
| 189 | 189 | width: 96%; |
| 190 | 190 | margin: 0 auto; |
| 191 | -} | |
| 192 | 191 | \ No newline at end of file |
| 192 | +} | |
| 193 | +.more-content{ | |
| 194 | + display: flex; | |
| 195 | + align-items: center; | |
| 196 | + image{ | |
| 197 | + width: 100rpx; | |
| 198 | + height: 100rpx; | |
| 199 | + border-radius: 100%; | |
| 200 | + } | |
| 201 | + .more-content-img { | |
| 202 | + image { | |
| 203 | + width: 24rpx; | |
| 204 | + height: 24rpx; | |
| 205 | + } | |
| 206 | + } | |
| 207 | + } | |
| 193 | 208 | \ No newline at end of file | ... | ... |
pages/recommend/postRecommend/postRecommend.vue
| ... | ... | @@ -39,12 +39,17 @@ |
| 39 | 39 | <uni-easyinput type="textarea" v-model="baseFormData.introduction" placeholder="请输入工作经历" /> |
| 40 | 40 | </uni-forms-item> |
| 41 | 41 | </uni-forms> |
| 42 | - <view class="isNotice"> | |
| 42 | + <view class="isNotice" style="display: flex; align-items: center; margin-top: 20rpx;justify-content: space-between;"> | |
| 43 | 43 | <view class="lef" style="margin-left: 30rpx;"> |
| 44 | 44 | 已选择<span>{{companysId.length}}</span>家企业 |
| 45 | 45 | </view> |
| 46 | - <view class="rig"> | |
| 47 | - <button type="primary" @click="toTellInfo()" style="border-radius: 40rpx;">通知信息填写</button> | |
| 46 | + <view class="rig" @click="toTellInfo()" style="display: flex;align-items: center;"> | |
| 47 | + <text>选择企业</text> | |
| 48 | + <view class="more-content"> | |
| 49 | + <view class="more-content-img"> | |
| 50 | + <image src="../../../static/right2.png"></image> | |
| 51 | + </view> | |
| 52 | + </view> | |
| 48 | 53 | </view> |
| 49 | 54 | </view> |
| 50 | 55 | </view> |
| ... | ... | @@ -371,5 +376,20 @@ |
| 371 | 376 | </script> |
| 372 | 377 | |
| 373 | 378 | <style lang="scss" scoped> |
| 374 | - @import 'Feedback.scss' | |
| 379 | + @import 'Feedback.scss'; | |
| 380 | + .more-content{ | |
| 381 | + display: flex; | |
| 382 | + align-items: center; | |
| 383 | + image{ | |
| 384 | + width: 100rpx; | |
| 385 | + height: 100rpx; | |
| 386 | + border-radius: 100%; | |
| 387 | + } | |
| 388 | + .more-content-img { | |
| 389 | + image { | |
| 390 | + width: 24rpx; | |
| 391 | + height: 24rpx; | |
| 392 | + } | |
| 393 | + } | |
| 394 | + } | |
| 375 | 395 | </style> |
| 376 | 396 | \ No newline at end of file | ... | ... |
pages/recommend/recommend.vue
| ... | ... | @@ -98,14 +98,14 @@ |
| 98 | 98 | // #endif |
| 99 | 99 | }, |
| 100 | 100 | methods: { |
| 101 | - // 获取用户信息 | |
| 101 | + // 获取用户信息判断是否有人才推荐的ID,权限判断authority = 529868097192985861 | |
| 102 | 102 | getUser() { |
| 103 | 103 | if (uni.getStorageSync('user')) { |
| 104 | 104 | let userCode = uni.getStorageSync("user") |
| 105 | 105 | console.log(userCode) |
| 106 | - if(userCode.userInfo.userId === 'admin'){ | |
| 107 | - this.isAdmin = true | |
| 108 | - } | |
| 106 | + let authorityID = userCode.permissionList | |
| 107 | + this.isAdmin = authorityID.some(it => it.modelId === '529868097192985861') | |
| 108 | + console.log('是否有人才推介权限',this.isAdmin) | |
| 109 | 109 | console.log('用户已登录!') |
| 110 | 110 | } |
| 111 | 111 | // else { | ... | ... |
pages/recommend/talent.scss
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | position: relative; |
| 17 | 17 | .top { |
| 18 | 18 | margin: 20rpx; |
| 19 | - padding-top: 30rpx; | |
| 19 | + // padding-top: 30rpx; | |
| 20 | 20 | display: flex; |
| 21 | 21 | justify-content: space-between; |
| 22 | 22 | image { |
| ... | ... | @@ -220,7 +220,7 @@ |
| 220 | 220 | align-items: center; |
| 221 | 221 | width: 100%; |
| 222 | 222 | /* #ifdef APP-PLUS */ |
| 223 | - height: calc(120rpx + var(--status-bar-height)); | |
| 223 | + // height: calc(120rpx + var(--status-bar-height)); | |
| 224 | 224 | /* #endif */ |
| 225 | 225 | padding: 0 20rpx; |
| 226 | 226 | .search { | ... | ... |
pages/talent/talent.scss
pages/talent/talent.vue
| ... | ... | @@ -110,11 +110,11 @@ |
| 110 | 110 | title: '请登录', |
| 111 | 111 | icon: 'none' |
| 112 | 112 | }) |
| 113 | - setTimeout(() => { | |
| 114 | - uni.reLaunch({ | |
| 115 | - url: '/pages/login/index' | |
| 116 | - }) | |
| 117 | - }) | |
| 113 | + // setTimeout(() => { | |
| 114 | + // uni.reLaunch({ | |
| 115 | + // url: '/pages/login/index' | |
| 116 | + // }) | |
| 117 | + // }) | |
| 118 | 118 | } |
| 119 | 119 | }, |
| 120 | 120 | // 获取人才列表 | ... | ... |
pages/tellInfo/tellInfo.vue
| ... | ... | @@ -15,12 +15,17 @@ |
| 15 | 15 | <uni-easyinput type="textarea" v-model="noticeDesc" placeholder="请输入" /> |
| 16 | 16 | </uni-forms-item> |
| 17 | 17 | </view> |
| 18 | - <view class="isNotice"> | |
| 18 | + <view class="isNotice" style="display: flex; align-items: center; margin-top: 20rpx;justify-content: space-between;"> | |
| 19 | 19 | <view class="lef" style="margin-left: 30rpx;"> |
| 20 | 20 | 已选择<span>{{companysId.length}}</span>家企业 |
| 21 | 21 | </view> |
| 22 | - <view class="rig"> | |
| 23 | - <button type="primary" @click="toChooseCom()" style="border-radius: 40rpx;">通知</button> | |
| 22 | + <view class="rig" @click="toChooseCom()" style="display: flex;align-items: center;"> | |
| 23 | + <text>选择企业</text> | |
| 24 | + <view class="more-content"> | |
| 25 | + <view class="more-content-img"> | |
| 26 | + <image src="../../static/right2.png"></image> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 24 | 29 | </view> |
| 25 | 30 | </view> |
| 26 | 31 | </view> |
| ... | ... | @@ -178,4 +183,19 @@ |
| 178 | 183 | |
| 179 | 184 | <style scoped lang="scss"> |
| 180 | 185 | @import 'Feedback.scss'; |
| 186 | + .more-content{ | |
| 187 | + display: flex; | |
| 188 | + align-items: center; | |
| 189 | + image{ | |
| 190 | + width: 100rpx; | |
| 191 | + height: 100rpx; | |
| 192 | + border-radius: 100%; | |
| 193 | + } | |
| 194 | + .more-content-img { | |
| 195 | + image { | |
| 196 | + width: 24rpx; | |
| 197 | + height: 24rpx; | |
| 198 | + } | |
| 199 | + } | |
| 200 | + } | |
| 181 | 201 | </style> |
| 182 | 202 | \ No newline at end of file | ... | ... |
service/request.js
| ... | ... | @@ -61,17 +61,17 @@ const request = function(url, method, data, noApiBase) { |
| 61 | 61 | // }) |
| 62 | 62 | |
| 63 | 63 | } else { |
| 64 | - // uni.showToast({ | |
| 65 | - // icon: 'none', | |
| 66 | - // title: res.data.message, | |
| 67 | - // duration: 2000 | |
| 68 | - // }); | |
| 64 | + uni.showToast({ | |
| 65 | + icon: 'none', | |
| 66 | + title: res.data.message, | |
| 67 | + duration: 2000 | |
| 68 | + }); | |
| 69 | 69 | resolve(res); |
| 70 | - // setTimeout(()=>{ | |
| 71 | - // uni.reLaunch({ | |
| 72 | - // url: '/pages/login/index' | |
| 73 | - // }) | |
| 74 | - // },1000) | |
| 70 | + setTimeout(()=>{ | |
| 71 | + uni.reLaunch({ | |
| 72 | + url: '/pages/login/index' | |
| 73 | + }) | |
| 74 | + },1000) | |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | }, | ... | ... |
static/780.jpg
0 → 100644
56.4 KB
static/790.jpg
0 → 100644
14 KB
static/appLogo.png
0 → 100644
107 KB
utils/request.js
| ... | ... | @@ -32,11 +32,11 @@ function request(config) { |
| 32 | 32 | url += '?client_id=admin&client_secret=123456&scope=all&grant_type=password' |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - if (config.options.load) { | |
| 36 | - uni.showLoading({ | |
| 37 | - title: config.options.loadText || '' | |
| 38 | - }) | |
| 39 | - } | |
| 35 | + // if (config.options.load) { | |
| 36 | + // uni.showLoading({ | |
| 37 | + // title: config.options.loadText || '' | |
| 38 | + // }) | |
| 39 | + // } | |
| 40 | 40 | |
| 41 | 41 | return new Promise((resolve, reject) => { |
| 42 | 42 | uni.request({ |
| ... | ... | @@ -46,20 +46,20 @@ function request(config) { |
| 46 | 46 | header: header, |
| 47 | 47 | timeout: define.timeout, |
| 48 | 48 | success: res => { |
| 49 | - uni.hideLoading() | |
| 49 | + // uni.hideLoading() | |
| 50 | 50 | if (res.statusCode === 200) { |
| 51 | 51 | if (res.data.code == 200) { |
| 52 | 52 | resolve(res.data) |
| 53 | 53 | } |
| 54 | - // else { | |
| 55 | - // ajaxError(res.data) | |
| 56 | - // reject(res.data.msg) | |
| 57 | - // } | |
| 54 | + else { | |
| 55 | + ajaxError(res.data) | |
| 56 | + reject(res.data.msg) | |
| 57 | + } | |
| 58 | 58 | } |
| 59 | - // else { | |
| 60 | - // ajaxError(res.data) | |
| 61 | - // reject(res.errMsg) | |
| 62 | - // } | |
| 59 | + else { | |
| 60 | + ajaxError(res.data) | |
| 61 | + reject(res.errMsg) | |
| 62 | + } | |
| 63 | 63 | }, |
| 64 | 64 | fail: err => { |
| 65 | 65 | uni.hideLoading() |
| ... | ... | @@ -69,22 +69,22 @@ function request(config) { |
| 69 | 69 | }) |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | -// function ajaxError(data) { | |
| 73 | -// uni.showToast({ | |
| 74 | -// title: data.msg || '请求出错,请重试', | |
| 75 | -// icon: 'none', | |
| 76 | -// complete() { | |
| 77 | -// if (data.code === 600 || data.code === 601 || data.code === 602) { | |
| 78 | -// setTimeout(() => { | |
| 79 | -// store.dispatch('user/resetToken').then(() => { | |
| 80 | -// uni.reLaunch({ | |
| 81 | -// url: '/pages/login/index' | |
| 82 | -// }) | |
| 83 | -// }) | |
| 84 | -// }, 1500) | |
| 85 | -// } | |
| 86 | -// } | |
| 87 | -// }) | |
| 88 | -// } | |
| 72 | +function ajaxError(data) { | |
| 73 | + uni.showToast({ | |
| 74 | + // title: data.msg || '请求出错,请重试', | |
| 75 | + // icon: 'none', | |
| 76 | + complete() { | |
| 77 | + if (data.code === 600 || data.code === 601 || data.code === 602) { | |
| 78 | + setTimeout(() => { | |
| 79 | + store.dispatch('user/resetToken').then(() => { | |
| 80 | + uni.reLaunch({ | |
| 81 | + url: '/pages/login/index' | |
| 82 | + }) | |
| 83 | + }) | |
| 84 | + }, 1500) | |
| 85 | + } | |
| 86 | + } | |
| 87 | + }) | |
| 88 | +} | |
| 89 | 89 | |
| 90 | 90 | export default request | ... | ... |