zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
  <div>
    <TableList
      ref="imageTablelist"
      :condtionConfig="condtionConfig"
      :columnConfig="columnConfig"
      :defValuesConfig="defValuesConfig"
      :operateBtns="operateBtns"
      :buttonsArr="[]"
      :userDefined="true"
      rowKeyName="dirno"
      :isParentOperate="true"
      @handleClickRowBtn="handleClickRowBtn"
      listApiName="qryCustomerList"
    />
  </div>
</template>
 
<script>
import TableList from "@/views/components/TableList.vue";
import {
  searchCondition,
  contactPhoneDefault,
  contactList
} from "./config/util";
// import { clientsManageList } from "./config/column.config";
// import { IMAGEDATACONFIGDEFVALUE } from "./config/defValues.config";
// import { IMAGEDATACONFIGRULES } from "./config/rules.config";
// import { IMAGEDATACONFIGFORM } from "./config/formItem.config";
import { qryDropDownOption, qryEntInfoDetail } from "@/http/api";
export default {
  props: {},
  provide() {
    return {
      getconfigInfo: this.getconfigInfo,
      getconfigForm: this.getconfigForm
    };
  },
  data() {
    return {
      condtionConfig: [...searchCondition],
      columnConfig: [...contactList],
      defValuesConfig: { ...contactPhoneDefault },
      // condformdefConfig: { ...IMAGEDATACONFIGDEF },
      optionsData: [],
      optionsArr: "CustomerType",
      operateBtns: []
    };
  },
  async created() {
    await this.getDictionaryList("customerType", "CustomerType");
  },
  methods: {
    async getDictionaryList(name, conditionName) {
      const params = { conditionName };
      const re = await qryDropDownOption(params);
      if (re.code && re.code === "00") {
        this.setFormInfo(name, { options: re.result });
      }
    },
    // 更新表单数据
    setFormInfo(nameKey, newInfo) {
      const { condtionConfig } = this;
      const index = condtionConfig.findIndex(({ name }) => name === nameKey);
      this.$set(this.condtionConfig, index, {
        ...condtionConfig[index],
        ...newInfo
      });
    },
    getconfigInfo(options = this.optionsData) {
      const items = {
        customerType: "CustomerType",
        businesstype: "ProductCode",
        imagetype: "ImageType",
        flowSelect: "flowModelList",
        phaseno: "phaseno"
      };
      this.condtionConfig = [...IMAGEDATACONFIGCOND].map(form => {
        const newForm = { ...form };
        if (newForm.type === "select") {
          newForm.options = options[items[newForm.name]];
        }
        return newForm;
      });
    },
    getconfigForm() {},
    async handleClickRowBtn(type, item) {
      const { customerId, customerTypeCode } = item;
    }
  },
  components: { TableList }
};
</script>
 
<style scoped>
</style>