|  | @@ -1,6 +1,9 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  |      <BasicTable @register="registerTable">
 | 
	
		
			
				|  |  | +      <template #tableTitle>
 | 
	
		
			
				|  |  | +        <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd">新增</a-button>
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  |        <template #action="{ record }">
 | 
	
		
			
				|  |  |          <TableAction :actions="getActions(record)" :dropDownActions="getDropDownAction(record)" />
 | 
	
		
			
				|  |  |        </template>
 | 
	
	
		
			
				|  | @@ -8,7 +11,7 @@
 | 
	
		
			
				|  |  |          <slot name="filterCell" v-bind="{ column, record }"></slot>
 | 
	
		
			
				|  |  |        </template>
 | 
	
		
			
				|  |  |      </BasicTable>
 | 
	
		
			
				|  |  | -    <DeviceModal @register="registerModal" @saveOrUpdate="saveOrUpdateHandler" :showTab="showTab" :deviceType="deviceType" />
 | 
	
		
			
				|  |  | +    <DeviceModal @register="registerModal" @saveOrUpdate="saveOrUpdateHandler" :deviceType="deviceType" />
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -17,9 +20,7 @@
 | 
	
		
			
				|  |  |    import { ref, provide, reactive, toRaw, defineExpose } from 'vue';
 | 
	
		
			
				|  |  |    import { BasicTable, TableAction } from '/@/components/Table';
 | 
	
		
			
				|  |  |    import { useModal } from '/@/components/Modal';
 | 
	
		
			
				|  |  | -  import DeviceModal from '../deviceManager/comment/DeviceModal.vue';
 | 
	
		
			
				|  |  | -  // import { getToken } from '/@/utils/auth';
 | 
	
		
			
				|  |  | -  // import { useGlobSetting } from '/@/hooks/setting';
 | 
	
		
			
				|  |  | +  import DeviceModal from './DeviceModal.vue';
 | 
	
		
			
				|  |  |    import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
 | 
	
		
			
				|  |  |    import { useListPage } from '/@/hooks/system/useListPage';
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -33,11 +34,11 @@
 | 
	
		
			
				|  |  |        // required: true,
 | 
	
		
			
				|  |  |        default: () => [],
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    // searchFormSchema: {
 | 
	
		
			
				|  |  | -    //   type: Array,
 | 
	
		
			
				|  |  | -    //   required: true,
 | 
	
		
			
				|  |  | -    //   default: () => [],
 | 
	
		
			
				|  |  | -    // },
 | 
	
		
			
				|  |  | +    searchFormSchema: {
 | 
	
		
			
				|  |  | +      type: Array,
 | 
	
		
			
				|  |  | +      required: true,
 | 
	
		
			
				|  |  | +      default: () => [],
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      formSchema: {
 | 
	
		
			
				|  |  |        type: Array,
 | 
	
		
			
				|  |  |        required: true,
 | 
	
	
		
			
				|  | @@ -46,22 +47,22 @@
 | 
	
		
			
				|  |  |        type: Function,
 | 
	
		
			
				|  |  |        required: true,
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getImportUrl: {
 | 
	
		
			
				|  |  | -      type: String,
 | 
	
		
			
				|  |  | -      required: true,
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    getExportUrl: {
 | 
	
		
			
				|  |  | -      type: String,
 | 
	
		
			
				|  |  | -      required: true,
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +    // getImportUrl: {
 | 
	
		
			
				|  |  | +    //   type: String,
 | 
	
		
			
				|  |  | +    //   required: true,
 | 
	
		
			
				|  |  | +    // },
 | 
	
		
			
				|  |  | +    // getExportUrl: {
 | 
	
		
			
				|  |  | +    //   type: String,
 | 
	
		
			
				|  |  | +    //   required: true,
 | 
	
		
			
				|  |  | +    // },
 | 
	
		
			
				|  |  |      deleteById: {
 | 
	
		
			
				|  |  |        type: Function,
 | 
	
		
			
				|  |  |        required: true,
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    batchDelete: {
 | 
	
		
			
				|  |  | -      type: Function,
 | 
	
		
			
				|  |  | -      // required: true,
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +    // batchDelete: {
 | 
	
		
			
				|  |  | +    //   type: Function,
 | 
	
		
			
				|  |  | +    //   // required: true,
 | 
	
		
			
				|  |  | +    // },
 | 
	
		
			
				|  |  |      saveOrUpdate: {
 | 
	
		
			
				|  |  |        type: Function,
 | 
	
		
			
				|  |  |        required: true,
 | 
	
	
		
			
				|  | @@ -70,10 +71,6 @@
 | 
	
		
			
				|  |  |        type: Function,
 | 
	
		
			
				|  |  |        // required: true,
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    showTab: {
 | 
	
		
			
				|  |  | -      type: Boolean,
 | 
	
		
			
				|  |  | -      default: false,
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  |      designScope: {
 | 
	
		
			
				|  |  |        type: String,
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -99,17 +96,15 @@
 | 
	
		
			
				|  |  |    console.log('aaa', columnList);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    // 列表页面公共参数、方法
 | 
	
		
			
				|  |  | -  const { prefixCls, tableContext, onExportXls, onImportXls, doRequest } = useListPage({
 | 
	
		
			
				|  |  | +  const { tableContext, doRequest } = useListPage({
 | 
	
		
			
				|  |  |      designScope: props.designScope,
 | 
	
		
			
				|  |  |      tableProps: {
 | 
	
		
			
				|  |  |        title: props.title,
 | 
	
		
			
				|  |  |        api: props.list,
 | 
	
		
			
				|  |  |        columns: props.columns.length > 0 ? (props.columns as any[]) : columnList,
 | 
	
		
			
				|  |  | -      showIndexColumn: true,
 | 
	
		
			
				|  |  |        // size: 'small',
 | 
	
		
			
				|  |  |        // bordered: false,
 | 
	
		
			
				|  |  |        formConfig: {
 | 
	
		
			
				|  |  | -        showActionButtonGroup: false,
 | 
	
		
			
				|  |  |          // labelWidth: 100,
 | 
	
		
			
				|  |  |          labelAlign: 'left',
 | 
	
		
			
				|  |  |          labelCol: {
 | 
	
	
		
			
				|  | @@ -120,23 +115,24 @@
 | 
	
		
			
				|  |  |            xl: 7,
 | 
	
		
			
				|  |  |            xxl: 5,
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | -        // schemas: props.searchFormSchema as any[],
 | 
	
		
			
				|  |  | +        schemas: props.searchFormSchema as any[],
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        striped: true,
 | 
	
		
			
				|  |  | +      showIndexColumn: true, //是否显示序列号
 | 
	
		
			
				|  |  |        actionColumn: {
 | 
	
		
			
				|  |  | -        width: 270,
 | 
	
		
			
				|  |  | +        width: 300,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        beforeFetch: (params) => {
 | 
	
		
			
				|  |  |          return Object.assign({ column: 'createTime', order: 'desc' }, params);
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    exportConfig: {
 | 
	
		
			
				|  |  | -      name: props.title,
 | 
	
		
			
				|  |  | -      url: props.getExportUrl,
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    importConfig: {
 | 
	
		
			
				|  |  | -      url: props.getImportUrl,
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +    // exportConfig: {
 | 
	
		
			
				|  |  | +    //   name: props.title,
 | 
	
		
			
				|  |  | +    //   url: props.getExportUrl,
 | 
	
		
			
				|  |  | +    // },
 | 
	
		
			
				|  |  | +    // importConfig: {
 | 
	
		
			
				|  |  | +    //   url: props.getImportUrl,
 | 
	
		
			
				|  |  | +    // },
 | 
	
		
			
				|  |  |    });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    //注册table数据
 | 
	
	
		
			
				|  | @@ -145,7 +141,7 @@
 | 
	
		
			
				|  |  |    const saveOrUpdateHandler = async (params) => {
 | 
	
		
			
				|  |  |      try {
 | 
	
		
			
				|  |  |        await props.saveOrUpdate(params, isUpdate.value);
 | 
	
		
			
				|  |  | -      !props.showTab ? closeModal() : '';
 | 
	
		
			
				|  |  | +      closeModal();
 | 
	
		
			
				|  |  |        await doRequest(props.list, { confirm: false });
 | 
	
		
			
				|  |  |      } catch (error) {
 | 
	
		
			
				|  |  |        message.error('保存失败,请联系管理员');
 | 
	
	
		
			
				|  | @@ -181,12 +177,12 @@
 | 
	
		
			
				|  |  |      await props.deleteById({ id: record }, reload);
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  /**
 | 
	
		
			
				|  |  | -   * 批量删除事件
 | 
	
		
			
				|  |  | -   */
 | 
	
		
			
				|  |  | -  async function batchHandleDelete() {
 | 
	
		
			
				|  |  | -    doRequest(() => props.batchDelete({ ids: selectedRowKeys.value }));
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | +  // /**
 | 
	
		
			
				|  |  | +  //  * 批量删除事件
 | 
	
		
			
				|  |  | +  //  */
 | 
	
		
			
				|  |  | +  // async function batchHandleDelete() {
 | 
	
		
			
				|  |  | +  //   doRequest(() => props.batchDelete({ ids: selectedRowKeys.value }));
 | 
	
		
			
				|  |  | +  // }
 | 
	
		
			
				|  |  |    /**
 | 
	
		
			
				|  |  |     * 查看
 | 
	
		
			
				|  |  |     */
 | 
	
	
		
			
				|  | @@ -200,23 +196,14 @@
 | 
	
		
			
				|  |  |     */
 | 
	
		
			
				|  |  |    function getActions(record) {
 | 
	
		
			
				|  |  |      return [
 | 
	
		
			
				|  |  | -      {
 | 
	
		
			
				|  |  | -        label: '编辑',
 | 
	
		
			
				|  |  | -        onClick: handleEdit.bind(null, record),
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  |        {
 | 
	
		
			
				|  |  |          label: '详情',
 | 
	
		
			
				|  |  |          onClick: handleEdit.bind(null, record),
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        {
 | 
	
		
			
				|  |  | -        label: '下载',
 | 
	
		
			
				|  |  | -        onClick: handleEdit.bind(null, record),
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      {
 | 
	
		
			
				|  |  | -        label: '审批流',
 | 
	
		
			
				|  |  | +        label: '编辑',
 | 
	
		
			
				|  |  |          onClick: handleEdit.bind(null, record),
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        {
 | 
	
		
			
				|  |  |          label: '删除',
 | 
	
		
			
				|  |  |          popConfirm: {
 | 
	
	
		
			
				|  | @@ -224,6 +211,14 @@
 | 
	
		
			
				|  |  |            confirm: handleDelete.bind(null, record),
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +        label: '下载',
 | 
	
		
			
				|  |  | +        onClick: handleEdit.bind(null, record),
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +        label: '审批',
 | 
	
		
			
				|  |  | +        onClick: handleEdit.bind(null, record),
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |        // {
 | 
	
		
			
				|  |  |        //   label: '查看',
 | 
	
		
			
				|  |  |        //   onClick: handleDetail.bind(null, record),
 | 
	
	
		
			
				|  | @@ -324,7 +319,4 @@
 | 
	
		
			
				|  |  |    //     }
 | 
	
		
			
				|  |  |    //   }
 | 
	
		
			
				|  |  |    // }
 | 
	
		
			
				|  |  | -  ::v-deep .zxm-table-title {
 | 
	
		
			
				|  |  | -    display: none;
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  |  </style>
 |