Commit 11fd471df76579d4edf9b63a412dafb15ed14558

Authored by 郭伟龙
1 parent d50eb363
Exists in charge

fix:修改问题

components/basisCellCard/basisCellCard.vue
... ... @@ -29,6 +29,9 @@
29 29 <view class="" v-else-if="item.dict">
30 30 {{getDictDataLabel(item.dict,item.value) || '— —'}}
31 31 </view>
  32 + <view class="" v-else-if="item.mode === 'time'">
  33 + {{item.value.slice(0,-9)}}
  34 + </view>
32 35 <view class="" v-else>
33 36 {{item.value}}
34 37 </view>
... ...
components/popUpFillIn/popUpFillIn.vue
... ... @@ -170,6 +170,9 @@
170 170 console.log("close")
171 171 this.show = false;
172 172 this.model = {};
  173 + this.radiovalueDHWH = "";
  174 + this.radiovalueGCWH = "";
  175 + this.radiovalueYYWH = "";
173 176 },
174 177 handleIgnition(dict) {
175 178 let dictArr = this.getDictDatas(dict);
... ... @@ -240,7 +243,8 @@
240 243 id: this.IgnitionID,
241 244 ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N',
242 245 nIgnRsn: this.model.nIgnRsn,
243   - ignTime: this.model.ignTime + ' 00:00:00'
  246 + userCode:this.model.userCode,
  247 + ignTime: this.radiovalueDHWH === '是' ? this.model.ignTime + ' 00:00:00' : ''
244 248 }
245 249 console.log(this.radiovalueGCWH);
246 250 console.log("点火数据", data);
... ... @@ -257,8 +261,8 @@
257 261 let data = {
258 262 id: this.IgnitionID,
259 263 isCompleted: this.radiovalueGCWH === '是' ? 'Y' : 'N',
260   - assignmentTime: this.model.assignmentTime + ' 00:00:00',
261   - completionTime: this.model.completionTime + ' 00:00:00',
  264 + assignmentTime: this.radiovalueGCWH === '是' ? this.model.assignmentTime + ' 00:00:00' : "",
  265 + completionTime: this.radiovalueGCWH === '是' ? this.model.completionTime + ' 00:00:00' : "",
262 266 nonNcmpRsn: this.model.nonNcmpRsn
263 267 }
264 268 console.log(this.radiovalueGCWH);
... ... @@ -276,8 +280,8 @@
276 280 let data = {
277 281 id: this.IgnitionID,
278 282 gasConnMtrRis: this.radiovalueYYWH === '是' ? 'Y' : 'N',
279   - assignmentTime: this.model.assignmentTime + ' 00:00:00',
280   - gctMtrrisTime: this.model.gctMtrrisTime + ' 00:00:00',
  283 + assignmentTime: this.radiovalueYYWH === '是' ? this.model.assignmentTime + ' 00:00:00' : "",
  284 + gctMtrrisTime: this.radiovalueYYWH === '是' ? this.model.gctMtrrisTime + ' 00:00:00' : "",
281 285 gctNcmpRsn: this.model.gctNcmpRsn
282 286 }
283 287 console.log("运营数据", data);
... ...
pages/charge/constructionMaintenance/detail.vue
... ... @@ -76,15 +76,18 @@
76 76 }, {
77 77 name: "市场派单时间",
78 78 value: "",
79   - key: "assignmentTime"
  79 + key: "assignmentTime",
  80 + mode:'time'
80 81 }, {
81 82 name: "是否竣工",
82 83 value: "",
83   - key: "isCompleted"
  84 + key: "isCompleted",
  85 + dict:'sys_yes_no'
84 86 }, {
85 87 name: "竣工时间",
86 88 value: "",
87   - key: "completionTime"
  89 + key: "completionTime",
  90 + mode:'time'
88 91 }, {
89 92 name: "未竣工原因",
90 93 value: "",
... ... @@ -96,11 +99,14 @@
96 99 }, {
97 100 name: "是否通气到表前/立管",
98 101 value: "",
99   - key: "gasConnMtrRis"
  102 + key: "gasConnMtrRis",
  103 + // dict:'sys_yes_no'
100 104 }, {
101 105 name: "是否通气到表前/立管时间",
102 106 value: "",
103   - key: "gctMtrrisTime"
  107 + key: "gctMtrrisTime",
  108 + mode:'time',
  109 + // dict:'sys_yes_no'
104 110 }, {
105 111 name: "未完成原因",
106 112 value: "",
... ...
pages/charge/constructionMaintenance/index.vue
1 1 <template>
2 2 <view class="app-container">
3 3 <u-navbar :title="title" safeAreaInsetTop placeholder>
4   - <view slot="left" class="text-red"></view>
  4 + <view class="flex justify-between" slot="left" @click="loginOut">
  5 + <u-icon size="15" name="/static/images/icon/login-out.png"></u-icon>
  6 + <view class="text-red margin-left-xs">
  7 + 退出
  8 + </view>
  9 + </view>
5 10 </u-navbar>
6 11 <!-- <view class="">
7 12 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}"
... ... @@ -121,7 +126,7 @@
121 126 searchForm: {
122 127 companyCode: "",
123 128 isCompleted: "",
124   - gasConnMtrRis:""
  129 + gasConnMtrRis: ""
125 130 },
126 131 model: {},
127 132 currentName: "",
... ... @@ -208,6 +213,9 @@
208 213 this.list = rows;
209 214 }
210 215 this.total = total;
  216 + if(this.total < this.params.pageNum * this.params.pageSize){
  217 + this.status = "nomore"
  218 + }
211 219 console.log('list', JSON.parse(JSON.stringify(this.list)));
212 220 }
213 221 },
... ... @@ -288,14 +296,15 @@
288 296 if (this.currentName === 'isCompleted') {
289 297 this.searchForm.isCompleted = dataLabel;
290 298 this.model.isCompleted = data;
291   - this.params.isCompleted = data==='是'?'Y':'N';
292   - }else if(this.currentName === 'gasConnMtrRis') {
  299 + this.params.isCompleted = data === '是' ? 'Y' : 'N';
  300 + } else if (this.currentName === 'gasConnMtrRis') {
293 301 this.searchForm.gasConnMtrRis = dataLabel;
294 302 this.model.gasConnMtrRis = data;
295   - this.params.gasConnMtrRis = data==='是'?'Y':'N'
  303 + this.params.gasConnMtrRis = data === '是' ? 'Y' : 'N'
296 304 }
297 305 this.pickerShow = false;
298 306 this.currentName = '';
  307 + this.list = [];
299 308 this.initData()
300 309 },
301 310 selectCancel(e) {
... ... @@ -311,6 +320,7 @@
311 320 this.gsShow = false;
312 321 this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...';
313 322 this.params.companyCode = this.model.companyCode;
  323 + this.list = [];
314 324 this.initData();
315 325 this.currentName = '';
316 326 },
... ... @@ -328,6 +338,29 @@
328 338 this.IgnitionID = item.id;
329 339 this.btnType = type;
330 340 this.$refs.popUpFillInRef.open();
  341 + },
  342 + loginOut() {
  343 + this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
  344 + //钉钉直接退出微应用
  345 + if (this.$isDing) {
  346 + dd.biz.navigation.close({
  347 + onSuccess: function(result) {
  348 + console.log(result, 'result')
  349 + },
  350 + onFail: function(err) {
  351 + console.log(err, 'err')
  352 + }
  353 + });
  354 + } else {
  355 + this.$store.dispatch('Logout').then((res) => {
  356 + uni.reLaunch({
  357 + url: '/pages/login/mobile'
  358 + })
  359 + })
  360 + }
  361 + }).catch(() => {
  362 + console.log("取消");
  363 + });
331 364 }
332 365 }
333 366 }
... ...
pages/charge/ignitionMaintenance/detail.vue
... ... @@ -93,7 +93,8 @@
93 93 }, {
94 94 name: "点火时间",
95 95 value: "",
96   - key: "ignTime"
  96 + key: "ignTime",
  97 + mode:'time'
97 98 }, {
98 99 name: "未点火原因",
99 100 value: "",
... ...
pages/charge/ignitionMaintenance/index.vue
1 1 <template>
2 2 <view class="app-container">
3 3 <u-navbar :title="title" safeAreaInsetTop placeholder>
4   - <view slot="left" class="text-red"></view>
  4 + <view class="flex justify-between" slot="left" @click="loginOut">
  5 + <u-icon size="15" name="/static/images/icon/login-out.png"></u-icon>
  6 + <view class="text-red margin-left-xs">
  7 + 退出
  8 + </view>
  9 + </view>
5 10 </u-navbar>
6 11 <!-- <view class="">
7 12 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}"
... ... @@ -54,7 +59,7 @@
54 59 <text class="text-grey margin-right-xs">地址:</text>{{item.userDetailedAddress || '--'}}
55 60 </view>
56 61 <view class="margin-top-sm">
57   - <text class="text-grey margin-right-xs">点火时间:</text>{{item.ignTime || '--'}}
  62 + <text class="text-grey margin-right-xs">点火时间:</text>{{item.ignTime?item.ignTime.slice(0,-9):'--'}}
58 63 </view>
59 64 </view>
60 65 <view class="flex justify-end margin-top">
... ... @@ -207,6 +212,9 @@
207 212 } else {
208 213 this.list = rows;
209 214 }
  215 + if(this.total < this.params.pageNum * this.params.pageSize){
  216 + this.status = "nomore"
  217 + }
210 218 this.total = total;
211 219 console.log('list', JSON.parse(JSON.stringify(this.list)));
212 220 }
... ... @@ -304,6 +312,7 @@
304 312 }
305 313 this.pickerShow = false;
306 314 this.currentName = '';
  315 + this.list = [];
307 316 this.initData()
308 317 },
309 318 selectCancel(e) {
... ... @@ -319,6 +328,7 @@
319 328 this.gsShow = false;
320 329 this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...';
321 330 this.params.companyCode = this.model.companyCode;
  331 + this.list = [];
322 332 this.initData();
323 333 this.currentName = '';
324 334 },
... ... @@ -326,6 +336,29 @@
326 336 this.gsShow = false;
327 337 this.currentName = '';
328 338 },
  339 + loginOut() {
  340 + this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
  341 + //钉钉直接退出微应用
  342 + if (this.$isDing) {
  343 + dd.biz.navigation.close({
  344 + onSuccess: function(result) {
  345 + console.log(result, 'result')
  346 + },
  347 + onFail: function(err) {
  348 + console.log(err, 'err')
  349 + }
  350 + });
  351 + } else {
  352 + this.$store.dispatch('Logout').then((res) => {
  353 + uni.reLaunch({
  354 + url: '/pages/login/mobile'
  355 + })
  356 + })
  357 + }
  358 + }).catch(() => {
  359 + console.log("取消");
  360 + });
  361 + }
329 362 }
330 363 }
331 364 </script>
... ...
pages/charge/visitsAndFees/detail.vue
... ... @@ -72,7 +72,8 @@
72 72 }, {
73 73 name: "入户时间",
74 74 value: "— —",
75   - key: "entryTime"
  75 + key: "entryTime",
  76 + mode:'time',
76 77 }, {
77 78 name: "项目公司/部门",
78 79 value: "— —",
... ...
pages/charge/visitsAndFees/index.vue
... ... @@ -84,7 +84,7 @@
84 84 <text class="text-grey margin-right-xs">用户:</text>{{item.userName|| "--"}}
85 85 </view>
86 86 </view>
87   - <view class="flex justify-between margin-top">
  87 + <view class="flex justify-end margin-top">
88 88 <view class="margin-right-xs">
89 89 <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover">
90 90 <view slot="content" class="popoverCss">
... ... @@ -108,16 +108,16 @@
108 108 <u-button shape="circle">更多操作</u-button>
109 109 </zb-popover>
110 110 </view>
111   - <view class="margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)">
  111 + <view class="w25 margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)">
112 112 <u-button shape="circle" color="#CF000D">修改</u-button>
113 113 </view>
114   - <view class="margin-right-xs" @click="handleDetail(item)">
  114 + <view class="w25 margin-right-xs" @click="handleDetail(item)">
115 115 <u-button shape="circle">查看详情</u-button>
116 116 </view>
117   - <view class="margin-right-xs" @click="handleRefuse(item)" v-if="auditPermission(item)">
  117 + <view class="w22 margin-right-xs" @click="handleRefuse(item)" v-if="auditPermission(item)">
118 118 <u-button shape="circle">拒绝</u-button>
119 119 </view>
120   - <view class="" @click="handleAgree(item)" v-if="auditPermission(item)">
  120 + <view class="w22" @click="handleAgree(item)" v-if="auditPermission(item)">
121 121 <u-button shape="circle" color="#CF000D">同意</u-button>
122 122 </view>
123 123 </view>
... ... @@ -559,6 +559,9 @@
559 559 } else {
560 560 this.list = rows;
561 561 }
  562 + if(this.total < this.params.pageNum * this.params.pageSize){
  563 + this.status = "nomore"
  564 + }
562 565 this.total = total;
563 566 console.log('list', JSON.parse(JSON.stringify(this.list)));
564 567 }
... ... @@ -573,6 +576,7 @@
573 576 console.log("搜索", e);
574 577 },
575 578 onClear() {
  579 + this.params.pageNum = 1;
576 580 this.keyword = "";
577 581 this.params.userName = "";
578 582 this.initData()
... ...
pages/login/workbench.vue
... ... @@ -7,7 +7,7 @@
7 7 <view class="text-xxl text-bold text-white">市场洞察平台</view>
8 8 <u-icon name="arrow-right" color="#fff"></u-icon>
9 9 </view>
10   - <view class="chargeCss margin-tb-xl padding flex justify-between align-center" @click="handleClick('charge')">
  10 + <view class="chargeCss margin-tb-xl padding flex justify-between align-center" v-if="validate()" @click="handleClick('charge')">
11 11 <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image>
12 12 <view class="text-xxl text-bold text-white">市场化收费工具</view>
13 13 <u-icon name="arrow-right" color="#fff"></u-icon>
... ... @@ -34,6 +34,16 @@
34 34  
35 35 },
36 36 methods: {
  37 + // 验证是否需要显示工具菜单
  38 + validate(){
  39 + let toolPermissions = ['schsf:mcVisit:list','schsf:mcIgnition:list','schsf:mcConstruction:list']
  40 + console.log(this);
  41 + // 假设 this.$checkPermi 是一个返回布尔值的方法
  42 + let hasPermission = toolPermissions.some(permission => {
  43 + return this.$checkPermi([permission]);
  44 + });
  45 + return hasPermission
  46 + },
37 47 handleClick(workName) {
38 48 console.log(workName);
39 49 this.$store.dispatch('setTab', {data: workName});
... ...
store/mudules/tabBar.js
1 1 import tabBars from '@/utils/tabbar.js'
2   -
  2 +import { checkPermi } from '@/utils/permission'
3 3 const tabbar = {
4 4 state: {
5 5 list: tabBars.insightTabList
... ... @@ -10,7 +10,19 @@ const tabbar = {
10 10 if(data === 'insight'){
11 11 state.list = tabBars.insightTabList
12 12 }else if(data === 'charge'){
13   - state.list = tabBars.chargeTabList
  13 + let data = tabBars.chargeTabList;
  14 + let list = []
  15 + console.log("工具菜单",data);
  16 + if(checkPermi(['schsf:mcVisit:list'])){
  17 + list.push(data[0])
  18 + }
  19 + if(checkPermi(['schsf:mcIgnition:list'])){
  20 + list.push(data[1])
  21 + }
  22 + if(checkPermi(['schsf:mcConstruction:list'])){
  23 + list.push(data[2])
  24 + }
  25 + state.list = list;
14 26 }
15 27 },
16 28 },
... ...
utils/ruoyi.js
... ... @@ -290,7 +290,8 @@ export function assignValues(obj, arr) {
290 290 name: item.name,
291 291 key: item.key,
292 292 value: Array.isArray(item.value) ? item.value : item.value === 0 ? 0 : item.value ? item.value : '— —',
293   - dict:item.dict
  293 + dict:item.dict,
  294 + mode:item.mode
294 295 };
295 296 });
296 297 return updatedArr;
... ...