sujunling 2 年 前
コミット
9e5fee6232

+ 143 - 0
src/views/resource/proxy/check.vue

@@ -0,0 +1,143 @@
+<template>
+  <BasicModal width="600px" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"
+    :useWrapper="true" :minHeight="200">
+    <div style="height: 50vh">
+      <BasicForm @register="registerForm">
+        <template #descinfo>
+          <div class="basic-info-title">描述信息</div>
+        </template>
+      </BasicForm>
+    </div>
+  </BasicModal>
+</template>
+<script lang="ts">
+import { defineComponent, ref, computed, unref, onMounted } from 'vue';
+import { BasicModal, useModalInner } from '/@/components/Modal';
+import { BasicForm, useForm } from '/@/components/Form/index';
+import { accountFormSchema } from './map.data.ts';
+import { filterRoleList } from '/@/api/system/system';
+import { useMessage } from '/@/hooks/web/useMessage';
+import { TOption } from '/@/views/rule/linkedge/config/config.data';
+import { PlusOutlined } from '@ant-design/icons-vue';
+import { subminExamineResult } from '/@/api/resource/examine';
+import { session } from '/@/utils/Memory.js';
+
+export default defineComponent({
+  name: 'AccountModal',
+  components: {
+    BasicModal,
+    BasicForm,
+    PlusOutlined,
+  },
+  emits: ['success', 'register'],
+  setup(_, { emit }) {
+    const tenantLogo = ref('');
+    const loading = ref(false);
+    const roleOptions = ref<TOption[]>([]);
+    const isUpdate = ref(true);
+    const bussid = ref('');
+    const userinfo = session.getItem('userInfo');
+    const getRoleList = async () => {
+      const res = await filterRoleList();
+      console.log(res);
+      roleOptions.value = res.map((m) => {
+        return {
+          label: m.name,
+          value: m.id,
+        };
+      });
+    };
+    onMounted(async () => {
+      //await getRoleList();   //这个会导致查询失败
+    });
+
+    const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
+      labelWidth: 100,
+      schemas: accountFormSchema,
+      showActionButtonGroup: false,
+      actionColOptions: {
+        span: 18,
+      },
+    });
+
+    const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
+      await resetFields();
+      setModalProps({ confirmLoading: false });
+      isUpdate.value = !!data?.isUpdate;
+      if (unref(isUpdate)) {
+        bussid.value = data.record.BUSSID;
+        setFieldsValue(data.record);
+      }
+    });
+    const getTitle = '审核';
+    async function handleSubmit() {
+      setModalProps({ confirmLoading: true });
+      try {
+        const { createMessage } = useMessage();
+        const values = await validate(); //validate(['parentId']);
+        console.log('userinfo', userinfo)
+        const params = {
+          bussInfoId: bussid.value,    //业务id
+          ispass: values.ispass,       //是否通过
+          opinion: values.opinion,      //意见
+        }
+        const res = await subminExamineResult(params) as any
+        if (res) {
+          console.log(res);
+          closeModal();
+          emit('success');
+          var type = res.resp_code == 0 ? 'success' : 'error';
+          createMessage[type](res.resp_msg);
+        } else {
+          closeModal();
+          emit('success');
+          createMessage.error('审核失败!');
+        }
+      } finally {
+        setTimeout(() => {
+          setModalProps({ confirmLoading: false });
+        }, 300);
+      }
+    }
+
+    return {
+      registerModal,
+      registerForm,
+      handleSubmit,
+      getTitle,
+      roleOptions,
+      tenantLogo,
+      loading,
+    };
+  },
+});
+</script>
+<style scoped lang="less">
+:deep(.vben-basic-tree) {
+  width: 100% !important;
+}
+
+:deep(.is-unflod) {
+  display: none !important;
+}
+
+:deep(.is-flod) {
+  display: none !important;
+}
+
+.basic-info-title {
+  height: 19px;
+  line-height: 18px;
+  padding-left: 6px;
+  margin-left: 20px;
+  border-left: 3px solid #0671dd;
+  font-family: Source Han Sans CN;
+  font-size: 16px;
+  font-weight: 350;
+  letter-spacing: 0px;
+}
+
+:deep(.ant-calendar-picker) {
+  width: 100% !important;
+}
+</style>

+ 420 - 0
src/views/resource/proxy/index.vue

@@ -0,0 +1,420 @@
+<template>
+  <div class="examine-container">
+    <div class="left-container">
+      <template v-for="source in sourceTypes" :key="source.SERVICETYPE">
+        <div class="soure-item-row" :class="{ active: current === source.SERVICETYPE }" @click="selectHandle(source)">
+          {{ source.name }}
+        </div>
+      </template>
+    </div>
+    <div class="right-container">
+      <BasicTable @register="registerTable" @fetch-success="onFetchSuccess">
+        <template #toolbar>
+          <Authority>
+            <a-button type="primary" @click="batchExamine" :disabled="hasBatchDelete">指定IP设置</a-button>
+          </Authority>
+        </template>
+
+        <template #action="{ record }">
+          <TableAction :actions="[
+            {
+              label: '浏览',
+              ifShow: current == 'DR' ? false : true,
+              onClick: handleVliew.bind(null, record),
+            },
+            {
+              label: '查看',
+              onClick: handleDetail.bind(null, record),
+            },
+            {
+              label: '审核',
+              disabled: statusShow == 1 ? false : true,
+              color: 'warning',
+              onClick: handleEdit.bind(null, record),
+            },
+          ]" />
+        </template>
+        <template #pdate="{ record }">
+          <a-tag :color="'red'">
+            {{ record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : '' }}
+          </a-tag>
+        </template>
+        <template #FLOWNAME="{ record }">
+          {{ record.FLOWNAME.replace('上传', '') }}
+        </template>
+        <template #status="{ record }">
+          <a-tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
+            {{
+              !record.status ? '待审核' : record.status == 2 ? '审核不通过' : record.status ? '审核通过' : ''
+            }}
+          </a-tag>
+        </template>
+        <template #BLZT="{ record }">
+          <a-tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
+            {{
+              record.BLZT
+            }}
+          </a-tag>
+        </template>
+      </BasicTable>
+      <check v-if="ischect" @register="registerModal" @success="handleSuccess" />
+      <map-resource-upload v-if="!ischect && current === 'MR'" @register="registerModal"
+        @success="handleSuccess"></map-resource-upload>
+      <scene-resource-upload v-if="!ischect && current === 'ER'" @register="registerModal"
+        @success="handleSuccess"></scene-resource-upload>
+      <file-resource-upload v-if="!ischect && current === 'DR'" @register="registerModal"
+        @success="handleSuccess"></file-resource-upload>
+      <ass-resource-upload v-if="!ischect && current === 'SR'" @register="registerModal"
+        @success="handleSuccess"></ass-resource-upload>
+    </div>
+  </div>
+</template>
+<script lang="ts">
+import { defineComponent, nextTick, ref, watch } from 'vue';
+import { BasicTable, useTable, TableAction } from '/@/components/Table';
+import { delRole, setRoleStatus } from '/@/api/system/system';
+import MapResourceUpload from '/@/views/dataAdmin/dataAdmin/mapUpload/MapSourceModal.vue';
+import FileResourceUpload from '/@/views/dataAdmin/dataAdmin/fileResourceUpload/AddMethod.vue';
+import SceneResourceUpload from '/@/views/dataAdmin/dataAdmin/sceneResourceUpload/AddMethod.vue';
+import AssResourceUpload from '/@/views/dataAdmin/assembly/MapSourceModal.vue';
+import check from './check.vue';
+import { getFileUrl } from '/@/api/resource/files';
+import { session } from '/@/utils/Memory.js';
+import {
+  columns,
+  searchFormSchemaMR,
+  searchFormSchemaER,
+  searchFormSchemaDR,
+  searchFormSchemaSR,
+} from './map.data';
+import { RoleEnum } from '/@/enums/roleEnum';
+import { Authority } from '/@/components/Authority';
+import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
+import { useMessage } from '/@/hooks/web/useMessage';
+import { Switch, Popconfirm } from 'ant-design-vue';
+import { queryResourceById } from '/@/api/resource/map';
+import Moment from 'moment';
+import { updateExamine } from '/@/api/resource/updateExamine';
+import { useModal } from '/@/components/Modal';
+import { useRouter } from 'vue-router';
+import { useAppStore } from '/@/store/modules/app';
+
+export default defineComponent({
+  name: 'RoleManagement',
+  components: {
+    BasicTable,
+    check,
+    TableAction,
+    Authority,
+    Switch,
+    Popconfirm,
+    MapResourceUpload,
+    FileResourceUpload,
+    AssResourceUpload,
+    SceneResourceUpload,
+  },
+  setup() {
+    const appStore = useAppStore();
+    const { currentRoute } = useRouter();
+    const currRoute = currentRoute.value;
+    let current = ref(currRoute?.query?.type || 'MR');
+    let statusShow = ref(1);
+    const [registerTable, { getSelectRows, setProps, reload, setSelectedRowKeys, getDataSource }] = useTable({
+      title: '地图资源审核列表',
+      api: (param) => {
+        statusShow.value = param.checkStatus;
+        const data = Object.assign(param, { serviceType: current.value });
+        return updateExamine(data);
+      }, //求接口
+      //dataSource: dataSources, //表格的数据
+      columns,
+      rowKey: (record) => record.BUSSID,
+      formConfig: {
+        labelWidth: 90,
+        schemas: searchFormSchemaMR,
+      },
+      useSearchForm: true,
+      showTableSetting: true,
+      bordered: true,
+      showIndexColumn: true,
+      actionColumn: {
+        width: 200,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: 'right',
+      },
+      pagination: {
+        hideOnSinglePage: false,
+        pageSize: 10,
+      },
+      clickToRowSelect: true, //点击当前行多选框不选中,默认是true
+      rowSelection: { type: 'checkbox' }, //是否有多选功能
+      tableSetting: {
+        redo: true,
+        size: true,
+        setting: false,
+        fullScreen: false,
+      },
+    });
+
+    const onFetchSuccess = () => {
+      // 请求后拿到数据,打开对应的资源审核弹窗
+      nextTick(() => {
+        let dataList = getDataSource()
+        if (currRoute?.query?.bussid && appStore.routerPushAuditFlag) {
+          dataList.forEach(item => {
+            item.BUSSID === currRoute.query.bussid && handleEdit(item)
+          })
+          let searchFormSchema = searchFormSchemaMR;
+          let title = '地图资源审核列表';
+          if (current.value === 'MR') {
+            searchFormSchema = searchFormSchemaMR;
+            title = '地图资源审核列表';
+          } else if (current.value === 'ER') {
+            searchFormSchema = searchFormSchemaER;
+            title = '场景资源审核列表';
+          } else if (current.value === 'DR') {
+            searchFormSchema = searchFormSchemaDR;
+            title = '文件资源审核列表';
+          } else {
+            searchFormSchema = searchFormSchemaSR;
+            title = '组件资源审核列表';
+          }
+          setProps({
+            title: title,
+            formConfig: {
+              labelWidth: 90,
+              schemas: searchFormSchema,
+            },
+          });
+        }
+      });
+    }
+
+    const moment = Moment;
+    const ischect = ref(true)
+    const sourceTypes = ref([
+      { SERVICETYPE: 'MR', name: '地图资源' },
+      { SERVICETYPE: 'ER', name: '场景资源' },
+      { SERVICETYPE: 'DR', name: '文件资源' },
+      { SERVICETYPE: 'SR', name: '组件资源' },
+    ]);
+    const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
+      useBatchDelete(delRole, handleSuccess, setProps);
+    selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => {
+      // Demo:status为1的选择框禁用
+      // if (record.status === 1) {
+      //   return { disabled: true };
+      // } else {
+      //   return { disabled: false };
+      // }
+    };
+    const [registerModal, { openModal }] = useModal();
+    watch(
+      () => current.value, (val) => {
+        let searchFormSchema = searchFormSchemaMR;
+        let title = '地图资源审核列表';
+        if (val === 'MR') {
+          searchFormSchema = searchFormSchemaMR;
+          title = '地图资源审核列表';
+        } else if (val === 'ER') {
+          searchFormSchema = searchFormSchemaER;
+          title = '场景资源审核列表';
+        } else if (val === 'DR') {
+          searchFormSchema = searchFormSchemaDR;
+          title = '文件资源审核列表';
+        } else {
+          searchFormSchema = searchFormSchemaSR;
+          title = '组件资源审核列表';
+        }
+        setProps({
+          title: title,
+          formConfig: {
+            labelWidth: 90,
+            schemas: searchFormSchema,
+          },
+        });
+        reload();
+      }
+    );
+    nextTick(() => {
+      setProps(selectionOptions);
+    });
+
+    function selectHandle(record) {
+      current.value = record.SERVICETYPE;
+    }
+
+    /**
+     * 详情
+     */
+    async function handleDetail(record: Recordable) {
+      ischect.value = false;
+      const res = (await queryResourceById(record?.SERVICEID)) as any;
+      if (res) {
+        if (res.dataVersionConf) {
+          res.metadata.isnew = res.servicebase.isnew = res.dataVersionConf.active == 'Y' ? "1" : "0";
+        }
+        const result = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
+        if (record.bussid) res.bussid = record.BUSSID;
+        openModal(true, {
+          record: result,
+          isUpdate: true,
+          isView: true,
+        });
+      }
+    }
+
+    /**
+     * 审核
+     */
+    function handleEdit(record: Recordable) {
+      ischect.value = true;
+      setTimeout(() => {
+        openModal(true, {
+          record,
+          isUpdate: true,
+        });
+        appStore.setRouterPushAuditFlag(false)
+      }, 100);
+    }
+    /**
+     * 浏览
+     */
+    async function handleVliew(record: Recordable) {
+      //场景资源
+      if (current.value === 'ER') {
+        window.open(`http://192.168.119.143:8080/onemapV5.0/sceneview.html?${record.SERVICEID}`, 'target', '');
+      }
+      //地图资源
+      if (current.value === 'MR') {
+        window.open(`http://192.168.119.143:8080/onemapV5.0/mapview.html?${record.SERVICEID}`, 'target', '');
+      }
+      //地图资源
+      if (current.value === 'SR') {
+        var res = (await queryResourceById(record?.SERVICEID)) as any;
+        res = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
+        if (res) {
+          window.open(`./mapview.html?onlineIde_${res.servicealiasname}`, 'target', '');
+        }
+      }
+      //文件资源
+      if (current.value === 'DR') {
+        const obj = {
+          id: record['fileid'],
+          userid: record['userid'],
+          parentId: session.getItem('sysFild').dirId,
+        };
+        const res = (await getFileUrl(obj)) as any;
+        if (res) {
+          const fileName = res.fileName;
+          console.log('下载文件', fileName);
+          const url = res.url;
+          window.open(url);
+        }
+      }
+      if (current.value === 'DR') {
+        console.log('组件');
+      }
+    }
+
+    function handleSuccess() {
+      openModal(false, {
+        isUpdate: false,
+      });
+      reload();
+    }
+
+    const statusChange = async (checked, record) => {
+      setProps({
+        loading: true,
+      });
+      setSelectedRowKeys([]);
+      resetSelectedRowKeys();
+      const newStatus = checked ? 1 : 0;
+      const { createMessage } = useMessage();
+      try {
+        await setRoleStatus(record.id, newStatus);
+        if (newStatus) {
+          createMessage.success(`启用成功`);
+        } else {
+          createMessage.success('禁用成功');
+        }
+      } finally {
+        setProps({
+          loading: false,
+        });
+        reload();
+      }
+    };
+    const batchExamine = () => {
+      console.log('审核数据', getSelectRows());
+    };
+
+
+    return {
+      statusShow,
+      current,
+      moment,
+      ischect,
+      sourceTypes,
+      registerTable,
+      registerModal,
+      handleVliew,
+      handleDetail,
+      handleEdit,
+      handleSuccess,
+      RoleEnum,
+      hasBatchDelete,
+      handleDeleteOrBatchDelete,
+      statusChange,
+      batchExamine,
+      selectHandle,
+      onFetchSuccess
+    };
+  },
+});
+</script>
+<style scoped lang="less">
+.examine-container {
+  display: flex;
+  height: 100%;
+  width: 100%;
+
+  .left-container {
+    width: 240px;
+    height: calc(100% - 32px);
+    margin: 16px 0 16px 10px;
+    padding: 10px 20px;
+    background-color: #fff;
+    border-radius: 2px;
+
+    .soure-item-row {
+      height: 34px;
+      width: 100%;
+      margin: 20px 0;
+      line-height: 34px;
+      text-align: center;
+      font-size: 14px;
+      font-weight: normal;
+      letter-spacing: 0px;
+      color: #333333;
+      background: #eff0f5;
+      border-radius: 2px;
+      cursor: pointer;
+    }
+
+    .active {
+      background: #0671dd;
+      color: #fff;
+    }
+  }
+
+  .right-container {
+    width: calc(100% - 260px);
+    height: 100%;
+  }
+}
+</style>
+

+ 324 - 0
src/views/resource/proxy/map.data.ts

@@ -0,0 +1,324 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { RoleEnum } from '/@/enums/roleEnum';
+import { getServiceTypes, queryServiceTags, queryDicsByName, queryCoors } from '/@/api/resource/map';
+
+const resTag = await queryServiceTags()
+let listTag = []
+resTag.map(item => {
+  listTag.push({
+    label: item.name,
+    value: item.code
+  })
+})
+/**
+ * 密级字典
+*/
+export const secrets = await queryDicsByName('密级')
+/**
+ * 服务标签
+*/
+export const serviceTags = listTag;
+/**
+ * 坐标系列表
+*/
+export const sysCoors = await queryCoors()
+/**
+ * 服务类型
+*/
+export const serviceTypes = await getServiceTypes()
+/**
+ * 责任处室
+*/
+export const respDept = await queryDicsByName('责任处室')
+/**
+ * 保管单位
+*/
+export const collectDept = await queryDicsByName('保管单位')
+/**
+ * EPSG code
+*/
+export const EPSGCodes = await queryDicsByName('EPSG code')
+
+
+const checkStatus = [
+  // { label: '未提交', value: 3 },
+  // { label: '审核中', value: 2 },
+  // { label: '审核不通过', value: 0 },
+  // { label: '被驳回', value: 4 },
+  // { label: '审核通过', value: 1 },
+
+  // { label: '全部状态', value: '7' },
+  // { label: '待审核', value: 0 },
+  // { label: '审核通过', value: 1 },
+  // { label: '审核不通过', value: 2 },
+
+  // { label: '在办', value: 1 },
+  { label: '待办', value: 1 },
+  { label: '已办结', value: 2 },
+
+  // { label: '待审核', value: 1 },
+  // { label: '已审核', value: 2 },
+]
+export enum KeysTypeEnum {
+  DISABLED = 'disabled',
+  ENABLED = 'enabled',
+}
+
+export const RoleMenuDictEnum: Recordable<{ key: string; keyType: KeysTypeEnum }> = {
+  [RoleEnum.PLATFORM_ADMIN]: { key: 'enabled_platform_admin_auth', keyType: KeysTypeEnum.ENABLED },
+  [RoleEnum.SYS_ADMIN]: { key: 'enabled_sysadmin_auth', keyType: KeysTypeEnum.ENABLED },
+  [RoleEnum.TENANT_ADMIN]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
+  [RoleEnum.CUSTOMER_USER]: { key: 'disabled_tenant_auth', keyType: KeysTypeEnum.DISABLED },
+};
+
+
+
+/**
+ * 查询条件
+*/
+export const searchFormSchemaMR: FormSchema[] = [
+  {
+    field: 'keyStr',
+    label: '关键字',
+    component: 'Input',
+    colProps: { span: 5 },
+    componentProps: {
+      maxLength: 255,
+    },
+  },
+  {
+    field: 'checkStatus',
+    label: '审核状态',
+    component: 'Select',
+    defaultValue: 1,
+    componentProps: {
+      options: checkStatus,
+    },
+    colProps: { span: 5 },
+  },
+];
+
+/**
+ * 查询条件
+*/
+export const searchFormSchemaER: FormSchema[] = [
+  {
+    field: 'keyStr',
+    label: '关键字',
+    component: 'Input',
+    colProps: { span: 5 },
+    componentProps: {
+      maxLength: 255,
+    },
+  },
+  {
+    field: 'checkStatus',
+    label: '审核状态',
+    component: 'Select',
+    defaultValue: 1,
+    componentProps: {
+      options: checkStatus,
+    },
+    colProps: { span: 5 },
+  },
+];
+
+/**
+ * 查询条件
+*/
+export const searchFormSchemaDR: FormSchema[] = [
+  {
+    field: 'keyStr',
+    label: '关键字',
+    component: 'Input',
+    colProps: { span: 5 },
+    componentProps: {
+      maxLength: 255,
+    },
+  },
+  {
+    field: 'checkStatus',
+    label: '审核状态',
+    component: 'Select',
+    defaultValue: 1,
+    componentProps: {
+      options: checkStatus,
+    },
+    colProps: { span: 5 },
+  },
+];
+
+/**
+ * 查询条件
+*/
+export const searchFormSchemaSR: FormSchema[] = [
+  {
+    field: 'keyStr',
+    label: '关键字',
+    component: 'Input',
+    colProps: { span: 5 },
+    componentProps: {
+      maxLength: 255,
+    },
+  },
+  {
+    field: 'checkStatus',
+    label: '审核状态',
+    component: 'Select',
+    defaultValue: 1,
+    componentProps: {
+      options: checkStatus,
+    },
+    colProps: { span: 5 },
+  },
+];
+
+
+/**
+ * 列表显示信息
+*/
+export const columns: BasicColumn[] = [
+  {
+    title: '资源类型',
+    dataIndex: 'FLOWNAME',
+    width: 120,
+    slots: { customRender: 'FLOWNAME' },
+  },
+  {
+    title: '资源名称',
+    dataIndex: 'SERVICENAME',
+    width: 160,
+  },
+  {
+    title: '申请时间',
+    dataIndex: 'SQSJ',
+    width: 180,
+    // slots: { customRender: 'pdate' },
+  },
+  {
+    title: '发布人',
+    dataIndex: 'SQR',
+    width: 80,
+  },
+
+  {
+    title: '当前环节',
+    dataIndex: 'NODENAME',
+    width: 90,
+  },
+  {
+    title: '当前处理人',
+    dataIndex: 'USERNAME',
+    width: 100,
+  },
+  // {
+  //   title: '审核状态',
+  //   dataIndex: 'BLZT',
+  //   width: 80,
+  //   slots: { customRender: 'BLZT' },
+  // },
+  {
+    title: '审核结果',
+    dataIndex: 'ISPASS',
+    align: 'center',
+    width: 80,
+    slots: { customRender: 'ISPASS' },
+  },
+  {
+    title: '审核意见',
+    dataIndex: 'CHECKINFO',
+    align: 'center',
+    width: 80,
+  },
+  // {
+  //   title: '审核时间',
+  //   dataIndex: 'checkTime',
+  //   width: 180,
+  // },
+  // {
+  //   title: '审核意见',
+  //   dataIndex: 'examine',
+  //   width: 180,
+  // },
+];
+
+/**
+ * 表单
+*/
+export const formSchema: FormSchema[] = [
+  {
+    field: 'groupName',
+    label: '角色名称',
+    required: true,
+    component: 'Input',
+    componentProps: {
+      maxLength: 255,
+      placeholder: '请输入角色名称',
+    },
+  },
+  {
+    label: '排序',
+    field: 'sort',
+    component: 'Input',
+    componentProps: {
+      maxLength: 255,
+      placeholder: '请输入排序',
+    },
+  }
+];
+
+function getOp() {
+  return new Promise<void>((resolve, reject) => {
+    resolve([
+      { label: "通过", value: '1' },
+      { label: "不通过", value: '0' },
+    ])
+  })
+}
+
+
+// 新增表单配置
+export const accountFormSchema = [
+  {
+    field: 'ispass',
+    label: "审核结果", //状态
+    component: 'RadioButtonGroup',
+    required: true,
+    colProps: { span: 24 },
+    defaultValue: '1',
+    componentProps: {
+      options: [
+        { label: "通过", value: '1' },
+        { label: "不通过", value: '0' },
+      ],
+    },
+  },
+  {
+    field: 'opinion',
+    label: '审核意见',
+    component: 'Input',
+    defaultValue: '',
+    colProps: { span: 24 },
+    componentProps: {
+      placeholder: '请输入审核意见',
+    },
+    dynamicRules: ({ values }) => {
+      if (values?.ispass) {
+        var type = Number(values?.ispass) ? false : true
+        return [{
+          required: type,
+          validator(_, value) {
+            return new Promise((resolve, reject) => {
+              if (type && !value) {
+                reject('不通过意见不能为空!');
+              } else {
+                resolve();
+              }
+            });
+          }
+        }];
+      }
+    },
+  },
+]