Commit 11fd471df76579d4edf9b63a412dafb15ed14558

Authored by 郭伟龙
1 parent d50eb363
Exists in charge

fix:修改问题

components/basisCellCard/basisCellCard.vue
@@ -29,6 +29,9 @@ @@ -29,6 +29,9 @@
29 <view class="" v-else-if="item.dict"> 29 <view class="" v-else-if="item.dict">
30 {{getDictDataLabel(item.dict,item.value) || '— —'}} 30 {{getDictDataLabel(item.dict,item.value) || '— —'}}
31 </view> 31 </view>
  32 + <view class="" v-else-if="item.mode === 'time'">
  33 + {{item.value.slice(0,-9)}}
  34 + </view>
32 <view class="" v-else> 35 <view class="" v-else>
33 {{item.value}} 36 {{item.value}}
34 </view> 37 </view>
components/popUpFillIn/popUpFillIn.vue
@@ -170,6 +170,9 @@ @@ -170,6 +170,9 @@
170 console.log("close") 170 console.log("close")
171 this.show = false; 171 this.show = false;
172 this.model = {}; 172 this.model = {};
  173 + this.radiovalueDHWH = "";
  174 + this.radiovalueGCWH = "";
  175 + this.radiovalueYYWH = "";
173 }, 176 },
174 handleIgnition(dict) { 177 handleIgnition(dict) {
175 let dictArr = this.getDictDatas(dict); 178 let dictArr = this.getDictDatas(dict);
@@ -240,7 +243,8 @@ @@ -240,7 +243,8 @@
240 id: this.IgnitionID, 243 id: this.IgnitionID,
241 ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N', 244 ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N',
242 nIgnRsn: this.model.nIgnRsn, 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 console.log(this.radiovalueGCWH); 249 console.log(this.radiovalueGCWH);
246 console.log("点火数据", data); 250 console.log("点火数据", data);
@@ -257,8 +261,8 @@ @@ -257,8 +261,8 @@
257 let data = { 261 let data = {
258 id: this.IgnitionID, 262 id: this.IgnitionID,
259 isCompleted: this.radiovalueGCWH === '是' ? 'Y' : 'N', 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 nonNcmpRsn: this.model.nonNcmpRsn 266 nonNcmpRsn: this.model.nonNcmpRsn
263 } 267 }
264 console.log(this.radiovalueGCWH); 268 console.log(this.radiovalueGCWH);
@@ -276,8 +280,8 @@ @@ -276,8 +280,8 @@
276 let data = { 280 let data = {
277 id: this.IgnitionID, 281 id: this.IgnitionID,
278 gasConnMtrRis: this.radiovalueYYWH === '是' ? 'Y' : 'N', 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 gctNcmpRsn: this.model.gctNcmpRsn 285 gctNcmpRsn: this.model.gctNcmpRsn
282 } 286 }
283 console.log("运营数据", data); 287 console.log("运营数据", data);
pages/charge/constructionMaintenance/detail.vue
@@ -76,15 +76,18 @@ @@ -76,15 +76,18 @@
76 }, { 76 }, {
77 name: "市场派单时间", 77 name: "市场派单时间",
78 value: "", 78 value: "",
79 - key: "assignmentTime" 79 + key: "assignmentTime",
  80 + mode:'time'
80 }, { 81 }, {
81 name: "是否竣工", 82 name: "是否竣工",
82 value: "", 83 value: "",
83 - key: "isCompleted" 84 + key: "isCompleted",
  85 + dict:'sys_yes_no'
84 }, { 86 }, {
85 name: "竣工时间", 87 name: "竣工时间",
86 value: "", 88 value: "",
87 - key: "completionTime" 89 + key: "completionTime",
  90 + mode:'time'
88 }, { 91 }, {
89 name: "未竣工原因", 92 name: "未竣工原因",
90 value: "", 93 value: "",
@@ -96,11 +99,14 @@ @@ -96,11 +99,14 @@
96 }, { 99 }, {
97 name: "是否通气到表前/立管", 100 name: "是否通气到表前/立管",
98 value: "", 101 value: "",
99 - key: "gasConnMtrRis" 102 + key: "gasConnMtrRis",
  103 + // dict:'sys_yes_no'
100 }, { 104 }, {
101 name: "是否通气到表前/立管时间", 105 name: "是否通气到表前/立管时间",
102 value: "", 106 value: "",
103 - key: "gctMtrrisTime" 107 + key: "gctMtrrisTime",
  108 + mode:'time',
  109 + // dict:'sys_yes_no'
104 }, { 110 }, {
105 name: "未完成原因", 111 name: "未完成原因",
106 value: "", 112 value: "",
pages/charge/constructionMaintenance/index.vue
1 <template> 1 <template>
2 <view class="app-container"> 2 <view class="app-container">
3 <u-navbar :title="title" safeAreaInsetTop placeholder> 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 </u-navbar> 10 </u-navbar>
6 <!-- <view class=""> 11 <!-- <view class="">
7 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" 12 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}"
@@ -121,7 +126,7 @@ @@ -121,7 +126,7 @@
121 searchForm: { 126 searchForm: {
122 companyCode: "", 127 companyCode: "",
123 isCompleted: "", 128 isCompleted: "",
124 - gasConnMtrRis:"" 129 + gasConnMtrRis: ""
125 }, 130 },
126 model: {}, 131 model: {},
127 currentName: "", 132 currentName: "",
@@ -208,6 +213,9 @@ @@ -208,6 +213,9 @@
208 this.list = rows; 213 this.list = rows;
209 } 214 }
210 this.total = total; 215 this.total = total;
  216 + if(this.total < this.params.pageNum * this.params.pageSize){
  217 + this.status = "nomore"
  218 + }
211 console.log('list', JSON.parse(JSON.stringify(this.list))); 219 console.log('list', JSON.parse(JSON.stringify(this.list)));
212 } 220 }
213 }, 221 },
@@ -288,14 +296,15 @@ @@ -288,14 +296,15 @@
288 if (this.currentName === 'isCompleted') { 296 if (this.currentName === 'isCompleted') {
289 this.searchForm.isCompleted = dataLabel; 297 this.searchForm.isCompleted = dataLabel;
290 this.model.isCompleted = data; 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 this.searchForm.gasConnMtrRis = dataLabel; 301 this.searchForm.gasConnMtrRis = dataLabel;
294 this.model.gasConnMtrRis = data; 302 this.model.gasConnMtrRis = data;
295 - this.params.gasConnMtrRis = data==='是'?'Y':'N' 303 + this.params.gasConnMtrRis = data === '是' ? 'Y' : 'N'
296 } 304 }
297 this.pickerShow = false; 305 this.pickerShow = false;
298 this.currentName = ''; 306 this.currentName = '';
  307 + this.list = [];
299 this.initData() 308 this.initData()
300 }, 309 },
301 selectCancel(e) { 310 selectCancel(e) {
@@ -311,6 +320,7 @@ @@ -311,6 +320,7 @@
311 this.gsShow = false; 320 this.gsShow = false;
312 this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...'; 321 this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...';
313 this.params.companyCode = this.model.companyCode; 322 this.params.companyCode = this.model.companyCode;
  323 + this.list = [];
314 this.initData(); 324 this.initData();
315 this.currentName = ''; 325 this.currentName = '';
316 }, 326 },
@@ -328,6 +338,29 @@ @@ -328,6 +338,29 @@
328 this.IgnitionID = item.id; 338 this.IgnitionID = item.id;
329 this.btnType = type; 339 this.btnType = type;
330 this.$refs.popUpFillInRef.open(); 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,7 +93,8 @@
93 }, { 93 }, {
94 name: "点火时间", 94 name: "点火时间",
95 value: "", 95 value: "",
96 - key: "ignTime" 96 + key: "ignTime",
  97 + mode:'time'
97 }, { 98 }, {
98 name: "未点火原因", 99 name: "未点火原因",
99 value: "", 100 value: "",
pages/charge/ignitionMaintenance/index.vue
1 <template> 1 <template>
2 <view class="app-container"> 2 <view class="app-container">
3 <u-navbar :title="title" safeAreaInsetTop placeholder> 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 </u-navbar> 10 </u-navbar>
6 <!-- <view class=""> 11 <!-- <view class="">
7 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" 12 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}"
@@ -54,7 +59,7 @@ @@ -54,7 +59,7 @@
54 <text class="text-grey margin-right-xs">地址:</text>{{item.userDetailedAddress || '--'}} 59 <text class="text-grey margin-right-xs">地址:</text>{{item.userDetailedAddress || '--'}}
55 </view> 60 </view>
56 <view class="margin-top-sm"> 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 </view> 63 </view>
59 </view> 64 </view>
60 <view class="flex justify-end margin-top"> 65 <view class="flex justify-end margin-top">
@@ -207,6 +212,9 @@ @@ -207,6 +212,9 @@
207 } else { 212 } else {
208 this.list = rows; 213 this.list = rows;
209 } 214 }
  215 + if(this.total < this.params.pageNum * this.params.pageSize){
  216 + this.status = "nomore"
  217 + }
210 this.total = total; 218 this.total = total;
211 console.log('list', JSON.parse(JSON.stringify(this.list))); 219 console.log('list', JSON.parse(JSON.stringify(this.list)));
212 } 220 }
@@ -304,6 +312,7 @@ @@ -304,6 +312,7 @@
304 } 312 }
305 this.pickerShow = false; 313 this.pickerShow = false;
306 this.currentName = ''; 314 this.currentName = '';
  315 + this.list = [];
307 this.initData() 316 this.initData()
308 }, 317 },
309 selectCancel(e) { 318 selectCancel(e) {
@@ -319,6 +328,7 @@ @@ -319,6 +328,7 @@
319 this.gsShow = false; 328 this.gsShow = false;
320 this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...'; 329 this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...';
321 this.params.companyCode = this.model.companyCode; 330 this.params.companyCode = this.model.companyCode;
  331 + this.list = [];
322 this.initData(); 332 this.initData();
323 this.currentName = ''; 333 this.currentName = '';
324 }, 334 },
@@ -326,6 +336,29 @@ @@ -326,6 +336,29 @@
326 this.gsShow = false; 336 this.gsShow = false;
327 this.currentName = ''; 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 </script> 364 </script>
pages/charge/visitsAndFees/detail.vue
@@ -72,7 +72,8 @@ @@ -72,7 +72,8 @@
72 }, { 72 }, {
73 name: "入户时间", 73 name: "入户时间",
74 value: "— —", 74 value: "— —",
75 - key: "entryTime" 75 + key: "entryTime",
  76 + mode:'time',
76 }, { 77 }, {
77 name: "项目公司/部门", 78 name: "项目公司/部门",
78 value: "— —", 79 value: "— —",
pages/charge/visitsAndFees/index.vue
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 <text class="text-grey margin-right-xs">用户:</text>{{item.userName|| "--"}} 84 <text class="text-grey margin-right-xs">用户:</text>{{item.userName|| "--"}}
85 </view> 85 </view>
86 </view> 86 </view>
87 - <view class="flex justify-between margin-top"> 87 + <view class="flex justify-end margin-top">
88 <view class="margin-right-xs"> 88 <view class="margin-right-xs">
89 <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> 89 <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover">
90 <view slot="content" class="popoverCss"> 90 <view slot="content" class="popoverCss">
@@ -108,16 +108,16 @@ @@ -108,16 +108,16 @@
108 <u-button shape="circle">更多操作</u-button> 108 <u-button shape="circle">更多操作</u-button>
109 </zb-popover> 109 </zb-popover>
110 </view> 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 <u-button shape="circle" color="#CF000D">修改</u-button> 112 <u-button shape="circle" color="#CF000D">修改</u-button>
113 </view> 113 </view>
114 - <view class="margin-right-xs" @click="handleDetail(item)"> 114 + <view class="w25 margin-right-xs" @click="handleDetail(item)">
115 <u-button shape="circle">查看详情</u-button> 115 <u-button shape="circle">查看详情</u-button>
116 </view> 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 <u-button shape="circle">拒绝</u-button> 118 <u-button shape="circle">拒绝</u-button>
119 </view> 119 </view>
120 - <view class="" @click="handleAgree(item)" v-if="auditPermission(item)"> 120 + <view class="w22" @click="handleAgree(item)" v-if="auditPermission(item)">
121 <u-button shape="circle" color="#CF000D">同意</u-button> 121 <u-button shape="circle" color="#CF000D">同意</u-button>
122 </view> 122 </view>
123 </view> 123 </view>
@@ -559,6 +559,9 @@ @@ -559,6 +559,9 @@
559 } else { 559 } else {
560 this.list = rows; 560 this.list = rows;
561 } 561 }
  562 + if(this.total < this.params.pageNum * this.params.pageSize){
  563 + this.status = "nomore"
  564 + }
562 this.total = total; 565 this.total = total;
563 console.log('list', JSON.parse(JSON.stringify(this.list))); 566 console.log('list', JSON.parse(JSON.stringify(this.list)));
564 } 567 }
@@ -573,6 +576,7 @@ @@ -573,6 +576,7 @@
573 console.log("搜索", e); 576 console.log("搜索", e);
574 }, 577 },
575 onClear() { 578 onClear() {
  579 + this.params.pageNum = 1;
576 this.keyword = ""; 580 this.keyword = "";
577 this.params.userName = ""; 581 this.params.userName = "";
578 this.initData() 582 this.initData()
pages/login/workbench.vue
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <view class="text-xxl text-bold text-white">市场洞察平台</view> 7 <view class="text-xxl text-bold text-white">市场洞察平台</view>
8 <u-icon name="arrow-right" color="#fff"></u-icon> 8 <u-icon name="arrow-right" color="#fff"></u-icon>
9 </view> 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 <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image> 11 <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image>
12 <view class="text-xxl text-bold text-white">市场化收费工具</view> 12 <view class="text-xxl text-bold text-white">市场化收费工具</view>
13 <u-icon name="arrow-right" color="#fff"></u-icon> 13 <u-icon name="arrow-right" color="#fff"></u-icon>
@@ -34,6 +34,16 @@ @@ -34,6 +34,16 @@
34 34
35 }, 35 },
36 methods: { 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 handleClick(workName) { 47 handleClick(workName) {
38 console.log(workName); 48 console.log(workName);
39 this.$store.dispatch('setTab', {data: workName}); 49 this.$store.dispatch('setTab', {data: workName});
store/mudules/tabBar.js
1 import tabBars from '@/utils/tabbar.js' 1 import tabBars from '@/utils/tabbar.js'
2 - 2 +import { checkPermi } from '@/utils/permission'
3 const tabbar = { 3 const tabbar = {
4 state: { 4 state: {
5 list: tabBars.insightTabList 5 list: tabBars.insightTabList
@@ -10,7 +10,19 @@ const tabbar = { @@ -10,7 +10,19 @@ const tabbar = {
10 if(data === 'insight'){ 10 if(data === 'insight'){
11 state.list = tabBars.insightTabList 11 state.list = tabBars.insightTabList
12 }else if(data === 'charge'){ 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,7 +290,8 @@ export function assignValues(obj, arr) {
290 name: item.name, 290 name: item.name,
291 key: item.key, 291 key: item.key,
292 value: Array.isArray(item.value) ? item.value : item.value === 0 ? 0 : item.value ? item.value : '— —', 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 return updatedArr; 297 return updatedArr;