<template>
|
<div>
|
<TableList
|
ref="imageTablelist"
|
:condtionConfig="condtionConfig"
|
:columnConfig="columnConfig"
|
:defValuesConfig="defValuesConfig"
|
:operateBtns="operateBtns"
|
:buttonsArr="[]"
|
:userDefined="true"
|
rowKeyName="dirno"
|
:isParentOperate="true"
|
@handleClickRowBtn="handleClickRowBtn"
|
listApiName="qryCusAdditionalInfoList"
|
/>
|
</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>
|