Browse Source

文件共享-提交

lxh 1 year ago
parent
commit
39e60b2bea

+ 330 - 0
src/views/vent/comment/fileTable.vue

@@ -0,0 +1,330 @@
+<template>
+  <div>
+    <BasicTable @register="registerTable">
+      <template #action="{ record }">
+        <TableAction :actions="getActions(record)" :dropDownActions="getDropDownAction(record)" />
+      </template>
+      <template #bodyCell="{ column, record }">
+        <slot name="filterCell" v-bind="{ column, record }"></slot>
+      </template>
+    </BasicTable>
+    <DeviceModal @register="registerModal" @saveOrUpdate="saveOrUpdateHandler" :showTab="showTab" :deviceType="deviceType" />
+  </div>
+</template>
+
+<script lang="ts" name="system-user" setup>
+  //ts语法
+  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 { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { useListPage } from '/@/hooks/system/useListPage';
+
+  const props = defineProps({
+    columnsType: {
+      type: String,
+      // required: true,
+    },
+    columns: {
+      type: Array,
+      // required: true,
+      default: () => [],
+    },
+    // searchFormSchema: {
+    //   type: Array,
+    //   required: true,
+    //   default: () => [],
+    // },
+    formSchema: {
+      type: Array,
+      required: true,
+    },
+    list: {
+      type: Function,
+      required: true,
+    },
+    getImportUrl: {
+      type: String,
+      required: true,
+    },
+    getExportUrl: {
+      type: String,
+      required: true,
+    },
+    deleteById: {
+      type: Function,
+      required: true,
+    },
+    batchDelete: {
+      type: Function,
+      // required: true,
+    },
+    saveOrUpdate: {
+      type: Function,
+      required: true,
+    },
+    pointList: {
+      type: Function,
+      // required: true,
+    },
+    showTab: {
+      type: Boolean,
+      default: false,
+    },
+    designScope: {
+      type: String,
+    },
+    title: {
+      type: String,
+    },
+    deviceType: {
+      type: String,
+    },
+  });
+
+  const isUpdate = ref(false);
+  const record = reactive({});
+
+  provide('formSchema', props.formSchema);
+  provide('isUpdate', isUpdate);
+  provide('formData', record);
+  provide('deviceType', props.deviceType);
+  // const glob = useGlobSetting();
+  const [registerModal, { openModal, closeModal }] = useModal();
+
+  const columnList = getTableHeaderColumns(props.columnsType);
+  console.log('aaa', columnList);
+
+  // 列表页面公共参数、方法
+  const { prefixCls, tableContext, onExportXls, onImportXls, 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: {
+          xs: 24,
+          sm: 24,
+          md: 24,
+          lg: 9,
+          xl: 7,
+          xxl: 5,
+        },
+        // schemas: props.searchFormSchema as any[],
+      },
+      striped: true,
+      actionColumn: {
+        width: 270,
+      },
+      beforeFetch: (params) => {
+        return Object.assign({ column: 'createTime', order: 'desc' }, params);
+      },
+    },
+    exportConfig: {
+      name: props.title,
+      url: props.getExportUrl,
+    },
+    importConfig: {
+      url: props.getImportUrl,
+    },
+  });
+
+  //注册table数据
+  const [registerTable, { reload }, { selectedRowKeys }] = tableContext;
+
+  const saveOrUpdateHandler = async (params) => {
+    try {
+      await props.saveOrUpdate(params, isUpdate.value);
+      !props.showTab ? closeModal() : '';
+      await doRequest(props.list, { confirm: false });
+    } catch (error) {
+      message.error('保存失败,请联系管理员');
+    }
+  };
+
+  /**
+   * 新增事件
+   */
+  function handleAdd() {
+    for (let key in record) {
+      delete record[key];
+    }
+    isUpdate.value = false;
+    openModal(true);
+  }
+
+  /**
+   * 编辑事件
+   */
+  function handleEdit(data) {
+    isUpdate.value = true;
+    Object.assign(record, toRaw(data));
+    openModal(true, {
+      record,
+    });
+  }
+
+  /**
+   * 删除事件
+   */
+  async function handleDelete(record) {
+    await props.deleteById({ id: record }, reload);
+  }
+
+  /**
+   * 批量删除事件
+   */
+  async function batchHandleDelete() {
+    doRequest(() => props.batchDelete({ ids: selectedRowKeys.value }));
+  }
+  /**
+   * 查看
+   */
+  // function handleDetail(record) {
+  //   iframeUrl.value = `${glob.uploadUrl}/sys/annountCement/show/${record.id}?token=${getToken()}`;
+  //   openDetail(true);
+  // }
+  /**
+   * 操作列定义
+   * @param record
+   */
+  function getActions(record) {
+    return [
+      {
+        label: '编辑',
+        onClick: handleEdit.bind(null, record),
+      },
+      {
+        label: '详情',
+        onClick: handleEdit.bind(null, record),
+      },
+      {
+        label: '下载',
+        onClick: handleEdit.bind(null, record),
+      },
+      {
+        label: '审批流',
+        onClick: handleEdit.bind(null, record),
+      },
+
+      {
+        label: '删除',
+        popConfirm: {
+          title: '是否确认删除',
+          confirm: handleDelete.bind(null, record),
+        },
+      },
+      // {
+      //   label: '查看',
+      //   onClick: handleDetail.bind(null, record),
+      // },
+    ];
+  }
+  /**
+   * 下拉操作栏
+   */
+  function getDropDownAction(record) {
+    return [
+      // {
+      //   label: '删除',
+      //   popConfirm: {
+      //     title: '是否确认删除',
+      //     confirm: handleDelete.bind(null, record),
+      //   },
+      // },
+      // {
+      //   label: '查看',
+      //   onClick: handleDetail.bind(null, record),
+      // },
+    ];
+  }
+  defineExpose({
+    doRequest,
+  });
+</script>
+
+<style scoped lang="less">
+  @ventSpace: zxm;
+
+  @vent-table-no-hover: #00bfff10;
+  // :deep(.ant-table-header){
+  //   background-color:transparent;
+  //   height: 0;
+  // }
+  // :deep(.jeecg-basic-table .ant-table-wrapper){
+  //   background-color: #ffffff00;
+  // }
+  // :deep(.ant-table-body) {
+  //   height: auto !important;
+  // }
+  // :deep(.ant-table){
+  //   background-color: #ffffff00 !important;
+  // }
+  // :deep(.ant-table-thead > tr > th){
+  //   background-color:transparent
+  // }
+  // :deep(.ant-table-body > tr > th){
+  //   background-color:transparent
+  // }
+  // :deep(.ant-table-body > tr > td){
+  //   border: none;
+  // }
+  // :deep(.ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body){
+  //   background-color:transparent
+  // }
+  // :deep(.jeecg-basic-table-row__striped td){
+  //   background-color: transparent;
+  // }
+  :deep(.@{ventSpace}-table-cell-row-hover) {
+    background: #264d8833 !important;
+  }
+  :deep(.@{ventSpace}-table-row-selected) {
+    background: #268bc522 !important;
+  }
+  // :deep(.ant-table-tbody) {
+  //   tr.ant-table-row-selected {
+  //     td {
+  //       background: #007cc415 !important;
+  //     }
+  //   }
+  // }
+
+  :deep(.@{ventSpace}-table-tbody > tr > td) {
+    background-color: #0dc3ff05;
+  }
+  :deep(.jeecg-basic-table-row__striped) {
+    // background: #97efff11 !important;
+    td {
+      // background-color: #97efff11 !important;
+      background-color: @vent-table-no-hover !important;
+    }
+  }
+  // :deep(.ant-table-thead) {
+  //   // background: linear-gradient(#003f77 0%, #004a86aa 10%) !important; //#003f77, #0a134c
+  //   background-color: #3d9dd45d !important;
+  //   & > tr > th,
+  //   .ant-table-column-title {
+  //     // color: #70f9fc !important;
+  //     color: #fff !important;
+  //     border-color: #91e9fe !important;
+  //     border-left: none !important;
+  //     // border-right: none !important;
+  //     &:last-child {
+  //       border-right: none !important;
+  //     }
+  //   }
+  // }
+  ::v-deep .zxm-table-title {
+    display: none;
+  }
+</style>

+ 1 - 1
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -259,7 +259,7 @@
 
 <style scoped lang="less">
   @ventSpace: zxm;
-  
+
   @vent-table-no-hover: #00bfff10;
   // :deep(.ant-table-header){
   //   background-color:transparent;

+ 1 - 1
src/views/vent/deviceManager/pointTabel/index.vue

@@ -13,7 +13,7 @@
       designScope="point-tabel"
       title="点表列表"
       :showTab="false"
-    />>
+    />
   </div>
 </template>
 

+ 83 - 0
src/views/vent/performance/fileDetail/fileDetail.api.ts

@@ -0,0 +1,83 @@
+import { defHttp } from '/@/utils/http/axios';
+import { Modal } from 'ant-design-vue';
+
+enum Api {
+  getTree = '/fileServerInfo/listFileServerInfo',
+  list = '/safety/ventanalyMonitorParams/list',
+  save = '/safety/ventanalyMonitorParams/add',
+  edit = '/safety/ventanalyMonitorParams/edit',
+  selectDevice = '/jeecg-system/sys/dict/DeviceKind/query',
+  deleteById = '/safety/ventanalyMonitorParams/delete',
+  deleteBatch = '/sys/user/deleteBatch',
+  importExcel = '/sys/user/importExcel',
+  exportXls = '/sys/user/exportXls',
+  queryDevice = '/sys/dict/DeviceKind/query',
+}
+
+/**
+ * 左侧树接口
+ * @param params
+ */
+export const getTree = (params) => defHttp.post({ url: Api.getTree, params });
+
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const queryDeviceList = (params) => defHttp.get({ url: Api.queryDevice, params });
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 设备类型查询接口
+ * @param params
+ */
+export const selectDevice = (params) => defHttp.get({ url: Api.selectDevice, params });
+
+/**
+ * 删除用户
+ */
+export const deleteById = (params, handleSuccess) => {
+  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+    handleSuccess();
+  });
+};
+/**
+ * 批量删除用户
+ * @param params
+ */
+export const batchDeleteById = (params, handleSuccess) => {
+  Modal.confirm({
+    title: '确认删除',
+    content: '是否删除选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
+        handleSuccess();
+      });
+    },
+  });
+};
+/**
+ * 保存或者更新用户
+ * @param params
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+  const url = isUpdate ? Api.edit : Api.save;
+  return isUpdate ? defHttp.put({ url: url, params }) : defHttp.post({ url: url, params });
+};

+ 107 - 0
src/views/vent/performance/fileDetail/fileDetail.data.ts

@@ -0,0 +1,107 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { TreeItem } from '/@/components/Tree/index';
+
+//tree
+export const treeData: TreeItem[] = [
+  {
+    title: '全部',
+    key: '0-0',
+    icon: 'home|svg',
+    children: [
+      { title: '台账类文件', icon: 'home|svg', key: '0-0-1' },
+      { title: '法律法规', icon: 'home|svg', key: '0-0-2' },
+      { title: '其他', icon: 'home|svg', key: '0-0-3' },
+    ],
+  },
+];
+
+export const columns: BasicColumn[] = [
+  {
+    title: '文件名称',
+    dataIndex: 'fileName',
+    width: 260,
+  },
+
+  {
+    title: '文件类型',
+    dataIndex: 'type',
+  },
+  {
+    title: '文件格式',
+    dataIndex: 'fileSuffix',
+  },
+  {
+    title: '创建人',
+    dataIndex: 'createUser',
+  },
+  {
+    title: '创建时间',
+    dataIndex: 'updateUser',
+  },
+  {
+    title: '修改人',
+    dataIndex: 'updateUser',
+  },
+  {
+    title: '修改时间',
+    dataIndex: 'updateDt',
+  },
+];
+
+export const formSchema: FormSchema[] = [
+  {
+    label: '',
+    field: 'id',
+    component: 'Input',
+    show: false,
+  },
+
+  // {
+  //   label: '点表类型',
+  //   field: 'devicetype',
+  //   component: 'ApiSelect',
+  //   componentProps: ({ formModel, formActionType }) => {
+  //     // debugger;
+  //     return {
+  //       // options: provincesOptions,
+  //       componentProps: {},
+  //       api: (params) => defHttp.get({ url: `/sys/dict/getDictItems/${formModel.devicekind + 'kind'}` }, params),
+  //       resultField: 'result',
+  //       labelField: 'title',
+  //       valueField: 'value',
+  //     };
+  //   },
+  // },
+  {
+    label: '文件名称',
+    field: 'fileName',
+    component: 'Input',
+  },
+
+  {
+    label: '文件类型',
+    field: 'type',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'valuetype',
+      placeholder: '请选择文件类型',
+      stringToNumber: true,
+    },
+  },
+  {
+    label: '文件格式',
+    field: 'fileSuffix',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'valuetype',
+      placeholder: '请选择文件来源',
+      stringToNumber: true,
+    },
+  },
+  {
+    label: '文件路径',
+    field: 'fileServerPath',
+    component: 'Upload',
+  },
+];

+ 109 - 0
src/views/vent/performance/fileDetail/index.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="file-details">
+    <div class="title">文件共享中心</div>
+    <div class="content">
+      <div class="left-box">
+        <a-button type="primary" style="margin-bottom: 15px">编辑目录</a-button>
+        <BasicTree :expandedKeys="expandedKeys" :treeData="treeData" />
+      </div>
+      <div class="right-box">
+        <div>
+          <a-input v-model:value="fileName" placeholder="请输入你需要搜索的文件名称" style="width: 320px; margin-right: 15px">
+            <template #suffix>
+              <a-tooltip title="Extra information">
+                <search-outlined />
+              </a-tooltip>
+            </template>
+          </a-input>
+          <a-button preIcon="ant-design:plus-outlined" type="primary">查询</a-button>
+          <a-button preIcon="ant-design:plus-outlined" type="primary" style="margin: 0px 15px">文件上传</a-button>
+          <a-button preIcon="ant-design:plus-outlined" type="primary">新建在线文档</a-button>
+        </div>
+        <!-- table -->
+        <fileTable
+          :columns="columns"
+          :list="list"
+          :formSchema="formSchema"
+          :deleteById="deleteById"
+          :saveOrUpdate="saveOrUpdate"
+          designScope="file-detail"
+          title="文件共享详情"
+          :showTab="false"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+<script lang="ts" setup name="system-user">
+  import { ref, onMounted } from 'vue';
+  import { BasicTree } from '/@/components/Tree/index';
+  import { treeData } from './fileDetail.data';
+  import { CollapseContainer } from '/@/components/Container/index';
+  import { SearchOutlined } from '@ant-design/icons-vue';
+  import fileTable from '../../comment/fileTable.vue';
+  import { columns, formSchema } from './fileDetail.data';
+
+  import { list, deleteById, saveOrUpdate } from './fileDetail.api';
+  components: {
+    CollapseContainer;
+  }
+  const expandedKeys = ref<string[]>(['0-0']); //默认展开树节点
+  let fileName = ref('');
+  // let getTreeList = async () => {
+  //   let data = await getTree({ parentId: '' });
+  //   console.log(data, 'data');
+  // };
+  onMounted(() => {
+    // getTreeList();
+  });
+</script>
+
+<style lang="less" scoped>
+  .file-details {
+    width: 100%;
+    height: 100%;
+    padding: 15px;
+    position: relative;
+    box-sizing: border-box;
+    .title {
+      height: 25px;
+      line-height: 25px;
+      margin-bottom: 30px;
+      font-size: 22px;
+      font-weight: 600;
+      text-align: center;
+      color: #fff;
+    }
+    .content {
+      width: 100%;
+      height: calc(100% - 85px);
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: flex-start;
+      .left-box {
+        width: 15%;
+        height: calc(100% - 20px);
+        border: 1px solid #bbbbbb;
+        border-radius: 15px;
+        margin-bottom: 20px;
+        padding: 10px;
+      }
+      .right-box {
+        width: 85%;
+        height: calc(100% - 20px);
+        padding: 10px 0px 0px 15px;
+        box-sizing: border-box;
+      }
+    }
+  }
+  ::v-deep .jeecg-svg-icon {
+    margin-right: 5px;
+  }
+  ::v-deep .zxm-tree-switcher {
+    opacity: 0;
+  }
+  ::v-deep .jeecg-basic-table-form-container {
+    padding: 10px 0px;
+  }
+</style>

+ 75 - 0
src/views/vent/performance/fileIndex/fileIndex.api.ts

@@ -0,0 +1,75 @@
+import { defHttp } from '/@/utils/http/axios';
+import { Modal } from 'ant-design-vue';
+
+enum Api {
+  list = '/safety/ventanalyMonitorParams/list',
+  save = '/safety/ventanalyMonitorParams/add',
+  edit = '/safety/ventanalyMonitorParams/edit',
+  selectDevice = '/jeecg-system/sys/dict/DeviceKind/query',
+  deleteById = '/safety/ventanalyMonitorParams/delete',
+  deleteBatch = '/sys/user/deleteBatch',
+  importExcel = '/sys/user/importExcel',
+  exportXls = '/sys/user/exportXls',
+  queryDevice = '/sys/dict/DeviceKind/query',
+}
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const queryDeviceList = (params) => defHttp.get({ url: Api.queryDevice, params });
+
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 设备类型查询接口
+ * @param params
+ */
+export const selectDevice = (params) => defHttp.get({ url: Api.selectDevice, params });
+
+/**
+ * 删除用户
+ */
+export const deleteById = (params, handleSuccess) => {
+  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+    handleSuccess();
+  });
+};
+/**
+ * 批量删除用户
+ * @param params
+ */
+export const batchDeleteById = (params, handleSuccess) => {
+  Modal.confirm({
+    title: '确认删除',
+    content: '是否删除选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
+        handleSuccess();
+      });
+    },
+  });
+};
+/**
+ * 保存或者更新用户
+ * @param params
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+  const url = isUpdate ? Api.edit : Api.save;
+  return isUpdate ? defHttp.put({ url: url, params }) : defHttp.post({ url: url, params });
+};

+ 320 - 0
src/views/vent/performance/fileIndex/fileIndex.data.ts

@@ -0,0 +1,320 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { queryDeviceList } from './performance.api';
+import { defHttp } from '/@/utils/http/axios';
+import { TreeItem } from '/@/components/Tree/index';
+
+//tree
+export const treeData: TreeItem[] = [
+  {
+    title: 'parent 1',
+    key: '0-0',
+    icon: 'home|svg',
+    children: [
+      { title: 'leaf', key: '0-0-0' },
+      {
+        title: 'leaf',
+        key: '0-0-1',
+        children: [
+          { title: 'leaf', key: '0-0-0-0' },
+          { title: 'leaf', key: '0-0-0-1' },
+        ],
+      },
+    ],
+  },
+  {
+    title: 'parent 2',
+    key: '1-1',
+    icon: 'home|svg',
+    children: [
+      { title: 'leaf', key: '1-1-0' },
+      { title: 'leaf', key: '1-1-1' },
+    ],
+  },
+  {
+    title: 'parent 3',
+    key: '2-2',
+    icon: 'home|svg',
+    children: [
+      { title: 'leaf', key: '2-2-0' },
+      { title: 'leaf', key: '2-2-1' },
+    ],
+  },
+];
+
+export const columns: BasicColumn[] = [
+  {
+    title: '设备类型',
+    dataIndex: 'devicekind_dictText',
+    width: 120,
+  },
+  // {
+  //   title: '设备类型code',
+  //   dataIndex: 'devicekind',
+  //   width: 120,
+  // },
+  // {
+  //   title: 'plc地址',
+  //   dataIndex: 'plcaddr',
+  //   width: 100,
+  // },
+  // {
+  //   title: 'plc读写位数',
+  //   dataIndex: 'floatnum',
+  //   width: 100,
+  //   // customRender: render.renderAvatar,
+  // },
+  // {
+  //   title: '读写类型',
+  //   dataIndex: 'datakind_dictText',
+  //   width: 80,
+  //   // sorter: true,
+  //   // customRender: ({ text }) => {
+  //   //   return render.renderDict(text, 'sex');
+  //   // },
+  // },
+  {
+    title: '值名称',
+    dataIndex: 'valuename',
+    width: 100,
+  },
+  {
+    title: '值code',
+    dataIndex: 'valuecode',
+    width: 100,
+  },
+  // {
+  //   title: '值类型',
+  //   width: 150,
+  //   dataIndex: 'valuetype_dictText',
+  // },
+  // {
+  //   title: '最小值',
+  //   width: 100,
+  //   dataIndex: 'fmin',
+  // },
+  // {
+  //   title: '最大值',
+  //   dataIndex: 'fmax',
+  //   width: 100,
+  // },
+  // {
+  //   title: '模拟最小值',
+  //   dataIndex: 'testlow',
+  //   width: 100,
+  // },
+  // {
+  //   title: '模拟最大值',
+  //   width: 100,
+  //   dataIndex: 'testup',
+  // },
+  // {
+  //   title: '小数位数',
+  //   width: 100,
+  //   dataIndex: 'floatnum',
+  // },
+  // {
+  //   title: '是否保存',
+  //   dataIndex: 'saveflag_dictText',
+  //   width: 80,
+  // },
+];
+
+export const searchFormSchema: FormSchema[] = [
+  {
+    label: '设备类型',
+    field: 'devicekind',
+    component: 'MTreeSelect',
+    colProps: { span: 6 },
+  },
+
+  {
+    label: '值名称',
+    field: 'valuename',
+    component: 'Input',
+    colProps: { span: 6 },
+  },
+  {
+    label: '值code',
+    field: 'valuecode',
+    component: 'Input',
+    colProps: { span: 6 },
+  },
+];
+
+export const formSchema: FormSchema[] = [
+  {
+    label: '',
+    field: 'id',
+    component: 'Input',
+    show: false,
+  },
+  {
+    label: '设备分类',
+    field: 'devicekind',
+    component: 'ApiSelect',
+    // componentProps: {
+    //   dictCode: 'devicekind',
+    //   placeholder: '请选择设备分类',
+    // },
+    componentProps: ({ formModel, formActionType }) => {
+      return {
+        // options: provincesOptions,
+        placeholder: '请选择设备分类',
+        api: queryDeviceList,
+        resultField: 'result',
+        // use name as label
+        labelField: 'itemText',
+        // use id as value
+        valueField: 'itemValue',
+        onChange: (e: any) => {
+          formModel.devicetype = '';
+          const { updateSchema } = formActionType;
+          updateSchema({
+            field: 'devicetype',
+            componentProps: {
+              api: (params) => defHttp.get({ url: `/sys/dict/getDictItems/${e + 'kind'}` }, params),
+              resultField: 'result',
+              labelField: 'title',
+              valueField: 'value',
+            },
+          });
+        },
+      };
+    },
+  },
+  {
+    label: '点表类型',
+    field: 'devicetype',
+    component: 'ApiSelect',
+    componentProps: ({ formModel, formActionType }) => {
+      // debugger;
+      return {
+        // options: provincesOptions,
+        componentProps: {},
+        api: (params) => defHttp.get({ url: `/sys/dict/getDictItems/${formModel.devicekind + 'kind'}` }, params),
+        resultField: 'result',
+        labelField: 'title',
+        valueField: 'value',
+      };
+    },
+  },
+  {
+    label: '值名称',
+    field: 'valuename',
+    component: 'Input',
+  },
+  {
+    label: '值code',
+    field: 'valuecode',
+    component: 'Input',
+  },
+  {
+    label: '值类型',
+    field: 'valuetype',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'valuetype',
+      placeholder: '请选择设备类型',
+      stringToNumber: true,
+    },
+  },
+  {
+    label: '指令默认写入值',
+    field: 'value',
+    component: 'Input',
+  },
+  {
+    label: 'plc地址',
+    field: 'plcaddr',
+    component: 'Input',
+  },
+  {
+    label: '数据类型',
+    field: 'datakind',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'datakind',
+      placeholder: '请选择数据类型',
+      stringToNumber: true,
+    },
+  },
+  {
+    label: '字节数',
+    field: 'len',
+    component: 'Input',
+  },
+  {
+    label: '最小值',
+    field: 'fmin',
+    component: 'InputNumber',
+  },
+  {
+    label: '最大值',
+    field: 'fmax',
+    component: 'InputNumber',
+  },
+  {
+    label: '模拟最小值',
+    field: 'testlow',
+    component: 'InputNumber',
+  },
+  {
+    label: '模拟最大值',
+    field: 'testup',
+    component: 'InputNumber',
+  },
+  {
+    label: '开始指令',
+    field: 'startcommand ',
+    component: 'InputTextArea',
+  },
+  {
+    label: '结束指令',
+    field: 'endcommand',
+    component: 'InputTextArea',
+  },
+  {
+    label: '控制指令设置模拟数据',
+    field: 'setTestdata',
+    component: 'InputTextArea',
+  },
+  {
+    label: '是否保存',
+    field: 'saveflag',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'booltype',
+      placeholder: '是否保存',
+    },
+  },
+  {
+    label: '是否报警',
+    field: 'bwarning',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'booltype',
+      placeholder: '是否报警',
+    },
+  },
+  {
+    label: '是否计算平均值',
+    field: 'avgflag',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'booltype',
+      placeholder: '是否计算平均值',
+    },
+  },
+  {
+    label: '小数位数',
+    field: 'floatnum',
+    component: 'InputNumber',
+  },
+
+  {
+    label: '备注',
+    field: 'strremark',
+    component: 'InputTextArea',
+  },
+];

+ 109 - 0
src/views/vent/performance/fileIndex/index.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="performance">
+    <div class="title">文件共享中心</div>
+    <div class="main-container">
+      <div class="card" v-for="item in titleList" :key="item.label" @click="getDetails">
+        <div class="card-title">{{ item.label }}</div>
+        <div class="card-content">
+          <div class="content-item">
+            <span>文档总数 : </span>
+            <span style="margin: 0px 30px">{{ 1000 }}</span>
+            <span>项</span>
+          </div>
+          <div class="content-item">
+            <span>待审批数 : </span>
+            <span style="margin: 0px 30px">{{ 200 }}</span>
+            <span>项</span>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script lang="ts" setup>
+  import { reactive } from 'vue';
+  import { useRouter } from 'vue-router';
+
+  let titleList = reactive([
+    { label: '测试1' },
+    { label: '测试2' },
+    { label: '测试3' },
+    { label: '测试4' },
+    { label: '测试5' },
+    { label: '测试6' },
+    { label: '测试7' },
+    { label: '测试8' },
+    { label: '测试9' },
+    { label: '测试10' },
+    { label: '测试11' },
+    { label: '测试12' },
+    { label: '测试13' },
+    { label: '测试14' },
+    { label: '测试15' },
+    { label: '测试16' },
+    { label: '测试17' },
+  ]);
+  let router = useRouter();
+  let getDetails = () => {
+    console.log('详情跳转');
+
+    router.push('/fileManager/fileDetail');
+  };
+</script>
+
+<style lang="less" scoped>
+  .performance {
+    width: 100%;
+    height: 100%;
+    padding: 15px;
+    position: relative;
+    box-sizing: border-box;
+    color: #fff;
+    .title {
+      height: 25px;
+      line-height: 25px;
+      margin-bottom: 30px;
+      font-size: 22px;
+      font-weight: 600;
+      text-align: center;
+    }
+    .main-container {
+      width: 90%;
+      height: calc(100% - 85px);
+      margin: 0px auto;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: flex-start;
+      flex-wrap: wrap;
+      .card {
+        width: 240px;
+        height: 132px;
+        border: 1px solid #98a7ba;
+        background: #185cb5;
+        border-radius: 10px;
+        padding: 8px 6px;
+        margin: 0px 20px 15px 20px;
+        box-sizing: border-box;
+        cursor: pointer;
+        .card-title {
+          height: 20px;
+          line-height: 20px;
+          font-size: 16px;
+          text-align: center;
+        }
+        .card-content {
+          height: calc(100% - 46px);
+          margin-top: 10px;
+          display: flex;
+          flex-direction: column;
+          justify-content: space-around;
+          align-items: flex-start;
+          .content-item {
+            font-size: 14px;
+          }
+        }
+      }
+    }
+  }
+</style>