meixioacomponent 0.3.42 → 0.3.46

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.
@@ -312,7 +312,7 @@ export default {
312
312
  </style> -->
313
313
 
314
314
  <template>
315
- <div class="page-table-wrap" ref="pageTableWrap">
315
+ <div class="page-table-wrap" ref="pageTableWrap" v-if="show">
316
316
  <base-pro-table
317
317
  :align="`left`"
318
318
  v-model="keyWords"
@@ -368,6 +368,8 @@ export default {
368
368
 
369
369
  <script>
370
370
  import tableTable from '../test'
371
+ import companyInfoConfig from '../config/CompanyInfoConfig'
372
+ import componentConfig from '../../packages/config/componentConfig'
371
373
  export default {
372
374
  data() {
373
375
  return {
@@ -424,19 +426,9 @@ export default {
424
426
  },
425
427
  ],
426
428
 
427
- // 分页属性
428
- /* 分页属性 */
429
- pageProps: {
430
- pageSize: 15,
431
- pageNum: 1,
432
- total: 100,
433
- },
434
- // 分页配置
435
- pageConfig: {
436
- size: 'pageSize',
437
- page: 'pageNum',
438
- total: 'total',
439
- },
429
+ show: true,
430
+
431
+ one: true,
440
432
  }
441
433
  },
442
434
  created() {
@@ -521,13 +513,25 @@ export default {
521
513
  mounted() {
522
514
  this.pageHeight = this.$refs.pageTableWrap.clientHeight
523
515
  },
516
+ computed: {
517
+ pageProps() {
518
+ return companyInfoConfig.getPageProps()
519
+ },
520
+ pageConfig() {
521
+ return companyInfoConfig.getPageConfig()
522
+ },
523
+ },
524
524
  components: {},
525
525
  methods: {
526
526
  async httpRequire(screenCofig) {
527
- let result = null
527
+ companyInfoConfig.setTable()
528
528
  try {
529
- // result = await test(screenCofig)
530
- this.pageProps.total = 20
529
+ // result = await test(screenCofig);
530
+ if (this.one) {
531
+ this.pageProps.total = 100
532
+ } else {
533
+ this.pageProps.total = 20
534
+ }
531
535
  } catch (error) {
532
536
  return new Promise((resolve, reject) => {
533
537
  this.pageProps.total = 0
@@ -535,7 +539,7 @@ export default {
535
539
  })
536
540
  }
537
541
  return new Promise((resolve, reject) => {
538
- resolve(tableTable)
542
+ resolve(companyInfoConfig.getTableData())
539
543
  })
540
544
  },
541
545
  rowClick(row) {
@@ -554,177 +558,6 @@ export default {
554
558
  </style>
555
559
 
556
560
  <!-- 普通表单 -->
557
- <!-- <template>
558
- <div class="add-company-step-two-wrap">
559
- <base-form
560
- :footer="false"
561
- :rules="rules"
562
- :rowNumber="1"
563
- @onCancel="onCancel"
564
- v-model="formList"
565
- :labelWidth="`200px`"
566
- :labelPosition="`right`"
567
- @formSubmit="formSubmit"
568
- >
569
- <template v-slot:form-businessLicense="data">
570
-
571
- <div class="upload-wrap">
572
- <base-upload-item
573
- :shape="`pro`"
574
- :fileType="`img`"
575
- @uploadEd="uploadEd"
576
- :uploadType="`single`"
577
- v-model="data.scope[3].value"
578
- >
579
- </base-upload-item>
580
- </div>
581
- </template>
582
- <template v-slot:form-idPositive="data">
583
-
584
- <div class="upload-wrap">
585
- <base-upload-item
586
- :shape="`pro`"
587
- :fileType="`img`"
588
- @uploadEd="uploadEd"
589
- :uploadType="`single`"
590
- v-model="data.scope[4].value"
591
- >
592
- </base-upload-item>
593
- </div>
594
- </template>
595
- <template v-slot:form-idBack="data">
596
-
597
- <div class="upload-wrap">
598
- <base-upload-item
599
- :shape="`pro`"
600
- :fileType="`img`"
601
- @uploadEd="uploadEd"
602
- :uploadType="`single`"
603
- v-model="data.scope[5].value"
604
- >
605
- </base-upload-item>
606
- </div>
607
- </template>
608
- </base-form>
609
- </div>
610
- </template> -->
611
-
612
- <!-- <script>
613
- export default {
614
- data() {
615
- return {
616
- formList: [
617
- {
618
- value: "",
619
- key: "companyName",
620
- type: "input",
621
- label: "企业名称",
622
- },
623
- {
624
- value: "",
625
- key: "companyAddress",
626
- type: "area",
627
- label: "通讯地址",
628
- },
629
- {
630
- value: "",
631
- key: "companyDetail",
632
- type: "textarea",
633
- label: "详细地址",
634
- },
635
- {
636
- value: [],
637
- key: "businessLicense",
638
- type: "template",
639
- label: "营业执照正面彩照",
640
- },
641
- {
642
- value: [],
643
- key: "idPositive",
644
- type: "template",
645
- label: "法人身份证人像照",
646
- },
647
- {
648
- value: [],
649
- key: "idBack",
650
- type: "template",
651
- label: "法人身份证国徽照",
652
- },
653
- ],
654
- rules: {
655
- companyName: [
656
- {
657
- required: true,
658
- message: "请输入企业名称",
659
- trigger: "blur",
660
- },
661
- ],
662
- companyAddress: [
663
- {
664
- required: true,
665
- message: "请输入通讯地址",
666
- trigger: "blur",
667
- },
668
- ],
669
- companyDetail: [
670
- {
671
- required: true,
672
- message: "请输入详细地址",
673
- trigger: "blur",
674
- },
675
- ],
676
- businessLicense: [
677
- {
678
- required: true,
679
- message: "请上传营业彩照",
680
- trigger: "blur",
681
- },
682
- ],
683
- idPositive: [
684
- {
685
- required: true,
686
- message: "请上传法人身份证人像照",
687
- trigger: "blur",
688
- },
689
- ],
690
- idBack: [
691
- {
692
- required: true,
693
- message: "请上传法人身份证国徽照",
694
- trigger: "blur",
695
- },
696
- ],
697
- },
698
- };
699
- },
700
- methods: {
701
- onCancel() {},
702
- formSubmit() {},
703
- uploadEd(value) {
704
- console.log(value);
705
- console.log(this.formList);
706
- },
707
- },
708
- };
709
- </script>
710
-
711
- <style lang="less" scoped>
712
- .add-company-step-two-wrap {
713
- width: 60%;
714
- height: 100%;
715
- overflow-y: auto;
716
- .upload-wrap {
717
- width: 100%;
718
- height: 170px;
719
- display: flex;
720
- align-items: center;
721
- justify-content: center;
722
- /deep/ .base-upload-item-wrap {
723
- margin: 0px;
724
- }
725
- }
726
- }
727
- </style> -->
728
561
 
729
562
  <!-- 上传表单 -->
730
563
  <!-- <template>
@@ -0,0 +1,26 @@
1
+ import { reactive } from 'vue'
2
+ import LinkViewClass from './linkViewClass'
3
+
4
+ class CompanyInfoConfig extends LinkViewClass {
5
+ constructor() {
6
+ super()
7
+ this.dynamicMount = null
8
+ this.drawerContent = null
9
+
10
+ this.tableData = []
11
+ }
12
+ setTable() {
13
+ this.tableData = [
14
+ { firmName: 1 },
15
+ { firmName: '这是一段八个字的文字' },
16
+ { firmName: 3 },
17
+ { firmName: 4 },
18
+ { firmName: 5 },
19
+ { firmName: 6 },
20
+ { firmName: 7 },
21
+ ]
22
+ }
23
+ }
24
+
25
+ const companyInfoConfig = reactive(new CompanyInfoConfig())
26
+ export default companyInfoConfig
@@ -0,0 +1,71 @@
1
+ class LinkViewClass {
2
+ constructor(params) {
3
+ this.tableData = []
4
+ this.refreshTableData = null
5
+ this.pageProps = {}
6
+ this.pageConfig = {}
7
+ this.activeIndex = 0
8
+ this.init()
9
+ }
10
+
11
+ init() {
12
+ this.tableData = []
13
+ this.activeIndex = 0
14
+ this.refreshTableData = null
15
+ this.pageProps = {
16
+ size: 15,
17
+ total: 100,
18
+ current: 1,
19
+ }
20
+ this.pageConfig = {
21
+ size: 'size',
22
+ page: 'current',
23
+ total: 'total',
24
+ }
25
+ }
26
+ onHandNextData() {
27
+ if (this.hasNextTableData()) {
28
+ this.activeIndex += 1
29
+ return
30
+ }
31
+ this.activeIndex = this.tableData.length - 1
32
+ }
33
+
34
+ onHandPreData() {
35
+ if (this.hasPreTableData()) {
36
+ this.activeIndex -= 1
37
+ }
38
+ this.activeIndex = 0
39
+ }
40
+
41
+ hasNextTableData() {
42
+ return this.tableData.length > 0
43
+ ? this.activeIndex == this.tableData.length - 1
44
+ ? false
45
+ : true
46
+ : false
47
+ }
48
+ hasPreTableData() {
49
+ return this.activeIndex <= 0 ? false : true
50
+ }
51
+ getTableDataForActiveIndex() {
52
+ return this.tableData[this.activeIndex]
53
+ }
54
+
55
+ getPageProps() {
56
+ return this.pageProps
57
+ }
58
+
59
+ getTableData() {
60
+ this.activeIndex = 0
61
+ return {
62
+ _class: this,
63
+ tableData: this.tableData,
64
+ }
65
+ }
66
+ getPageConfig() {
67
+ return this.pageConfig
68
+ }
69
+ }
70
+
71
+ export default LinkViewClass
package/src/main.js CHANGED
@@ -8,7 +8,7 @@ import testSelectStore from "./component/testSelectStore";
8
8
  import "../packages/components/style/index.less";
9
9
  meixioacomponent.componentConfig.initConfig(store, router);
10
10
  meixioacomponent.componentConfig.setUploadPrefix(
11
- "http://192.168.31.156:9999/files/files"
11
+ "http://gateway.wubangtu.xyz:9999/files/files"
12
12
  );
13
13
 
14
14
  Vue.use(ElementUI);