manage-client 3.3.243 → 3.3.244-kelai

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,8 @@ var compiler = webpack(config)
11
11
  // Define HTTP proxies to your custom API backend
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
13
  // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
- var shaoguan = 'http://119.146.1.106:8300/'
15
- var qtx= 'http://36.103.222.144:6300/'
14
+ // var shaoguan = 'http://119.146.1.106:8300/'
15
+ // var qtx= 'http://36.103.222.144:6300/'
16
16
  // var bendi = 'http://220.194.141.253:8600/'
17
17
  // var bendi = 'http://203.57.101.233:9001'
18
18
  // var bendi = 'http://172.168.1.11:9001/'
package/index.html CHANGED
@@ -6,23 +6,39 @@
6
6
  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
7
7
  <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
8
8
  <META HTTP-EQUIV="expires" CONTENT="0">
9
- <title>奥枫信息系统</title>
10
- <style media="screen">
11
- /*url(./static/newmainbg.jpg)*/
12
- body {
13
- width: 100%;
14
- background: #7f8eaf no-repeat center bottom;
15
- background-size: cover;
16
- }
9
+ <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
10
+ <script src="https://webapi.amap.com/maps?v=1.4.2&key=a511f5f7695b395a4eebf72b20e0f6e9"></script>
11
+ <!--引入UI组件库(1.1版本) -->
12
+ <script src="https://webapi.amap.com/ui/1.1/main.js?v=1.1.1"></script>
17
13
 
18
- body .loginbg {
19
- width: 100%;
20
- height: 100%;
21
- background: url(./static/loginbg.jpg) no-repeat center top;
14
+ <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
15
+ <title>智慧燃气</title>
16
+ <script src="./static/wasm_exec.js"></script>
17
+ <script src="./static/Functions.js"></script>
18
+ <script src="./static/init.js"></script>
19
+ <script src="./static/tools.js"></script>
20
+ <script src="./static/Jsons.js"></script>
21
+ <script src="./static/class.js"></script>
22
+ <script>
23
+ window._AMapSecurityConfig = {
24
+ securityJsCode: '63ff2a8a1ebed829c0626296c2cd5f9f'
22
25
  }
26
+ global.loadWasm().then(()=>{
27
+ global.run()
28
+ })
29
+ </script>
30
+ <style media="screen">
31
+ /*url(./static/newmainbg.jpg)*/
32
+ body{width: 100%;background:#7f8eaf no-repeat center bottom; background-size: cover;}
33
+ body .loginbg{ width:100%; height:100%; background:url(./static/loginbgmain.jpg) no-repeat center top;}
23
34
  </style>
24
35
  </head>
25
36
  <body id="bodymain" class="themeOne">
26
37
  <app></app>
27
38
  </body>
28
39
  </html>
40
+ <style>
41
+ * {
42
+ font-family: PingFangSC-Regular;
43
+ }
44
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.3.243",
3
+ "version": "3.3.244-kelai",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
package/src/App.vue CHANGED
@@ -1,29 +1,61 @@
1
1
  <template>
2
- <div>
3
- <app-base class="bg">
4
- <div class='flex'>
5
- <article>
6
- <!--<route :comp="{name: 'liaoyuan-manage-home'}"></route>-->
7
- <!--<route :comp="{name: 'meter-reading'}"></route>-->
8
- <!--<route :comp="{name: 'Gasproperties'}"></route>-->
9
- <!--<route :comp="{name: 'vender-management'}"></route>-->
10
- <!--<route :comp="{name: 'malfunction-home'}"></route>-->
11
- <route :comp="{name: 'login'}"></route>
12
- <!-- <route :comp="{name: 'call-report-main-page'}"></route>-->
13
- <!-- <route :comp="{name: 'load-data'}"></route> -->
14
- <!--<route :comp="{name: 'load-params', props: {componentName: 'login'}}"></route>-->
15
- <!-- <route :comp="{name: 'load-params', props: {dataUrl: ['api/af-revenue/sql/getMeterBrand','api/af-revenue/sql/getPriceType','api/af-revenue/sql/getMeterStyle'], componentName: 'login'}}"></route> -->
16
- </article>
17
- </div>
18
- </app-base>
19
- </div>
2
+ <app-base class="bg" @click="isTimeOut">
3
+ <div class='flex'>
4
+ <article>
5
+ <route :comp="{name: 'login'}"></route>
6
+ </article>
7
+ </div>
8
+ </app-base>
20
9
  </template>
21
10
 
22
11
  <script>
23
-
24
-
12
+ import Vue from 'vue'
25
13
  export default {
26
-
27
-
14
+ data () {
15
+ return {
16
+ lastTime: null, // 最后一次点击的时间
17
+ currentTime: null, // 当前点击的时间
18
+ // 获取一次不在获取控制
19
+ getConfig: false,
20
+ config: {
21
+ timeOut: 0, // 单位: 分钟
22
+ exitPrompt: '因您长时间未操作, 请重新登陆!'
23
+ },
24
+ }
25
+ },
26
+ ready() {
27
+ Vue.mmType = 'AES'
28
+ Vue.mm = "OXuYieBb4eoIne^K"
29
+ Vue.timeout = 120000
30
+ },
31
+ created () {
32
+ this.lastTime = new Date().getTime()
33
+ },
34
+ methods: {
35
+ async isTimeOut () {
36
+ // 获取config配置
37
+ if (!this.getConfig && this.$login.f && this.$login.f.dir) {
38
+ await this.$getConfig(this, 'App')
39
+ this.getConfig = true
40
+ }
41
+ // 无配置,不开启
42
+ if (this.config.timeOut <= 0) return
43
+ // 记录这次点击的时间
44
+ this.currentTime = new Date().getTime()
45
+ // 判断上次最后一次点击的时间和这次点击的时间间隔是否大于超时时间
46
+ if (this.currentTime - this.lastTime > (this.config.timeOut * 60 * 1000)) {
47
+ // 如果是登录状态
48
+ if (this.$login.f.id) {
49
+ await this.$showMessage(this.config.exitPrompt)
50
+ window.location.reload()
51
+ } else {
52
+ this.lastTime = new Date().getTime()
53
+ }
54
+ } else {
55
+ // 如果在超时时间内点击,则把这次点击的时间记录覆盖掉之前存的最后一次点击的时间
56
+ this.lastTime = new Date().getTime()
57
+ }
58
+ }
59
+ }
28
60
  }
29
61
  </script>
@@ -82,8 +82,9 @@
82
82
  <v-select :value.sync="model.f_price_name"
83
83
  v-model="model.f_price_name"
84
84
  :options="$parent.$parent.getPricenames"
85
- condition="ss.f_price_name = '{}'"
86
- close-on-select></v-select>
85
+ condition="ss.f_price_name in {}"
86
+ multiple
87
+ value-single="false"></v-select>
87
88
  </div>
88
89
  <div class="col-sm-2 form-group">
89
90
  <label class="font_normal_body">气表品牌</label>
@@ -373,7 +374,7 @@ export default {
373
374
  date.push(`终止时间:${this.$refs.paged.$refs.criteria.model.endDate}`)
374
375
  this.other.push(date)
375
376
  },
376
- initParams() {
377
+ async initParams() {
377
378
  // 初始化气表品牌
378
379
  let brandArr = []
379
380
  this.$MagGetSaleParam.getGasbrand().forEach((item) => {
@@ -385,12 +386,40 @@ export default {
385
386
  }
386
387
  })
387
388
  this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
388
- //初始化气表价格
389
- this.prices = this.$MagGetSaleParam.getPrices();
389
+
390
+ // 初始化气表价格 - 直接调用 SQL 查询
391
+ try {
392
+ // 构建查询条件 - 始终使用当前登录用户的组织ID
393
+ let orgIds = `'${this.$login.f.orgid}'`
394
+ let condition = `f_filialeid = ${orgIds} `
395
+
396
+ // 查询 t_stairprice 表
397
+ let res = await this.$resetpost('api/af-revenue/sql/manage_singleTable', {
398
+ data: {
399
+ items: '*',
400
+ tablename: 't_stairprice',
401
+ orderitem: 'f_priority',
402
+ condition: condition
403
+ }
404
+ }, {newly: true, resolveMsg: null, rejectMsg: '获取价格数据出错!!!'})
405
+
406
+ if (res.data && res.data.length > 0) {
407
+ this.prices = res.data
408
+ } else {
409
+ this.prices = []
410
+ }
411
+ } catch (error) {
412
+ console.error('获取价格数据失败:', error)
413
+ this.prices = []
414
+ }
390
415
  },
391
416
  async updateParams() {
392
- await this.$MagLoadParams.loadParam(this.f_filialeid)
393
- this.initParams()
417
+ // 由于我们现在直接获取价格数据,不再需要调用 $MagLoadParams.loadParam
418
+ // 如果其他数据仍然需要通过该方法获取,可以保留下面的调用
419
+ // await this.$MagLoadParams.loadParam(this.f_filialeid)
420
+
421
+ // 调用异步的 initParams 方法
422
+ await this.initParams()
394
423
  },
395
424
  getorg(obj) {
396
425
  if(plugins.convertToIn(obj)!==null&&plugins.convertToIn(obj)!==''){
@@ -472,34 +501,38 @@ export default {
472
501
  return `开始时间:${this.$refs.paged.$refs.criteria.model.startDate} 结束时间:${this.$refs.paged.$refs.criteria.model.endDate}`
473
502
  },
474
503
  getPricenames() {
475
- let f_user_type = this.$refs.paged.$refs.criteria.model.f_user_type;
476
- let f_gasproperties = this.$refs.paged.$refs.criteria.model.f_gasproperties;
477
504
  let pricetype = this.$refs.paged.$refs.criteria.model.pricetype;
478
- console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
479
- console.log("查看f_orgid:",this.$login.f.f_orgid)
480
505
  if(this.$refs.paged.$refs.criteria.model !==null) {
481
506
  let rs = []
482
507
  let priceArr = []
483
508
  if ( pricetype.length >0) {
484
- let params = {
485
- f_price_type: pricetype[0],
486
- filter: this.org[0],
487
- prices: this.prices
488
- }
489
- console.log("打印一下params:",params)
490
- this.$MagGetSaleParam.getPrice(params).forEach((item) => {
491
- console.log("====================================》")
492
- let temp = {}
493
- temp.label = item.label
494
- temp.value = item.value.f_price_name
495
- priceArr.push(temp)
496
- console.log("打印一下temp:",temp)
509
+ let f_price_type = pricetype[0]
510
+ let filter = this.$login.f.orgid
511
+
512
+ // 在组件内部实现气价名称筛选逻辑
513
+ this.prices.forEach((item) => {
514
+ // 根据气价类型和组织ID筛选
515
+ if (item.f_price_type === f_price_type && item.f_filialeid === filter) {
516
+ let temp = {}
517
+ temp.label = item.f_price_name
518
+ temp.value = item.f_price_name
519
+ priceArr.push(temp)
520
+ }
497
521
  })
498
522
 
499
- rs = [{label: '全部', value: ''}, ...priceArr]
523
+ // 数组去重
524
+ let uniquePriceArr = []
525
+ let hash = {}
526
+ for (let item of priceArr) {
527
+ if (!hash[item.value]) {
528
+ hash[item.value] = true
529
+ uniquePriceArr.push(item)
530
+ }
531
+ }
532
+
533
+ rs = [{label: '全部', value: ''}, ...uniquePriceArr]
500
534
  }
501
535
  if (rs.length === 0) {
502
- console.log('rs读出来是空')
503
536
  this.$refs.paged.$refs.criteria.model.f_price_name = ''
504
537
  }
505
538
  return rs
@@ -520,6 +553,45 @@ export default {
520
553
  tableState() {
521
554
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
522
555
  },
556
+ // 价格类型和价格名称的级联数据
557
+ priceCascaderData() {
558
+ if (!this.prices || this.prices.length === 0) {
559
+ return []
560
+ }
561
+
562
+ // 按价格类型分组
563
+ let typeMap = new Map()
564
+ this.prices.forEach(price => {
565
+ let typeKey = price.f_price_type
566
+ if (!typeMap.has(typeKey)) {
567
+ typeMap.set(typeKey, [])
568
+ }
569
+ typeMap.get(typeKey).push(price)
570
+ })
571
+
572
+ // 构建级联数据格式
573
+ let cascaderData = []
574
+ typeMap.forEach((prices, type) => {
575
+ // 创建价格类型节点
576
+ let typeItem = {
577
+ label: type,
578
+ value: type,
579
+ children: []
580
+ }
581
+
582
+ // 为每个价格类型添加价格名称子节点
583
+ prices.forEach(price => {
584
+ typeItem.children.push({
585
+ label: price.f_price_name,
586
+ value: price.f_price_name
587
+ })
588
+ })
589
+
590
+ cascaderData.push(typeItem)
591
+ })
592
+
593
+ return cascaderData
594
+ },
523
595
  gasState() {
524
596
  return [{label:'正常', value:'正常'},
525
597
  {label:'异常', value:'异常'},
@@ -9,7 +9,7 @@
9
9
  <div class="col-sm-2 form-group">
10
10
  <label class="font_normal_body">&emsp;公&emsp;&emsp;司</label>
11
11
  <right-tree @re-res="$parent.$parent.getorg"
12
- :initresid='$parent.$parent.org'></right-tree>
12
+ :initresid='$parent.$parent.org'></right-treee>
13
13
  </div>
14
14
 
15
15
  <div class="col-sm-2 form-group ">
package/src/main.js CHANGED
@@ -6,7 +6,8 @@ import { all } from 'vue-client'
6
6
  import { system } from 'system-clients'
7
7
  import { ldap } from 'ldap-clients'
8
8
  import saleManage from './saleManage'
9
- import ShanXianSaleManage from './filiale/hantou/sale'
9
+ import ShanXianSaleManage from './filiale/kelai/sale'
10
+ // import ShanXianwebSaleManage from './filiale/rongcheng/webmeterManage'
10
11
  import webmeterManage from './webmeterManage'
11
12
  import reportManage from './reportManage'
12
13
  import newmanage from './newmanage'
@@ -56,7 +57,7 @@ require('./components/qinhua/Style/qinhuaStyle.less')
56
57
  // require('./bootstrap/less/manageStyle/manageChile.less')
57
58
  // require('./bootstrap/less/manageStyle/safeStyle.less')
58
59
 
59
- //大屏展示要放开的样式
60
+ // 大屏展示要放开的样式
60
61
  // require('system-clients/src/styles/less/manageStyle/manageChile.less')
61
62
  // require('system-clients/src/styles/less/manageStyle/safeStyle.less')
62
63
  // require('system-clients/src/styles/less/manageStyle/manageStyle.less')