|
|
@@ -3,7 +3,11 @@
|
|
|
<div class="filterTable">
|
|
|
<FilterOption :selectList="selectList"
|
|
|
:inputList="inputList"
|
|
|
- :fixedBtnList="fixedBtnList" />
|
|
|
+ :fixedBtnList="fixedBtnList">
|
|
|
+ <template #selectAfter>
|
|
|
+ <a-checkbox v-model:checked="includesub">包含子级</a-checkbox>
|
|
|
+ </template>
|
|
|
+ </FilterOption>
|
|
|
<slot></slot>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -12,12 +16,17 @@
|
|
|
import FilterOption from '@/common/components/filter/index.vue';
|
|
|
import { defineComponent } from 'vue';
|
|
|
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
|
|
|
+import { ref } from 'vue';
|
|
|
+import { queryTableList } from '@/common/setup/table/list';
|
|
|
+import { initData } from '@/common/methods';
|
|
|
+import { queryParentAreaList } from '@/services/go/ermcp/qhj';
|
|
|
+import { QhjParentAreaList } from '@/services/go/ermcp/qhj/interface';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'filter-custom-table',
|
|
|
components: { FilterOption },
|
|
|
setup(props, context) {
|
|
|
- const select: SelectList[] = [
|
|
|
+ const select = ref<SelectList[]>([
|
|
|
{
|
|
|
value: undefined,
|
|
|
key: 'userinfotype',
|
|
|
@@ -27,15 +36,41 @@ export default defineComponent({
|
|
|
{ value: 2, lable: '企业' },
|
|
|
],
|
|
|
},
|
|
|
- ];
|
|
|
+ {
|
|
|
+ value: undefined,
|
|
|
+ key: 'userid',
|
|
|
+ placeholder: '请选择子机构',
|
|
|
+ list: [],
|
|
|
+ },
|
|
|
+ ]);
|
|
|
const input: InputList[] = [
|
|
|
{ value: '', placeholder: '模糊搜索客户简称', key: 'nickname' },
|
|
|
{ value: '', placeholder: '模糊搜索客户名称', key: 'name' },
|
|
|
{ value: '', placeholder: '模糊搜索手机号码', key: 'phone' },
|
|
|
];
|
|
|
- const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
|
|
|
+ // 是否包含子级 1-包含
|
|
|
+ const includesub = ref<boolean>(false);
|
|
|
+ const param = {
|
|
|
+ search(result: any) {
|
|
|
+ result.includesub = includesub.value ? 1 : 0;
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ includesub.value = false;
|
|
|
+ },
|
|
|
+ };
|
|
|
+ const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, param);
|
|
|
+ const { queryTable } = queryTableList<QhjParentAreaList>();
|
|
|
+ initData(() => {
|
|
|
+ queryTable(queryParentAreaList).then((res) => {
|
|
|
+ select.value[1].list = res.map((e) => {
|
|
|
+ return { value: e.userid, lable: e.accountname };
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
return {
|
|
|
selectList,
|
|
|
+ includesub,
|
|
|
inputList,
|
|
|
fixedBtnList,
|
|
|
};
|
|
|
@@ -44,5 +79,4 @@ export default defineComponent({
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
-
|
|
|
</style>;
|