| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <BasicModal title="审核管理" @register="registerModal" @ok="handleSubmit">
- <div style="height: 80px;">
- <BasicForm @register="registerForm">
- <template #descinfo>
- <div class="basic-info-title">审核意见</div>
- </template>
- </BasicForm>
- </div>
- </BasicModal>
- </template>
- <script lang="ts">
- import { defineComponent, ref, 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';
- import eventBus from '/@/utils/eventBus';
- 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() {
- var id = bussid.value;
- console.log('审核', id);
- //setModalProps({ confirmLoading: true });
- try {
- const { createMessage } = useMessage();
- const values = await validate(); //validate(['parentId']);
- console.log('userinfo', userinfo)
- const params = {
- bussInfoId: id, //业务id
- ispass: values.ispass, //是否通过
- opinion: values.opinion, //意见
- }
- const res = await subminExamineResult(params) as any
- if (res && res.resp_code === 0) {
- var type = res.resp_code == 0 ? 'success' : 'error';
- createMessage[type](res.resp_msg);
- closeModal()
- eventBus.emit('sjscshsj');
- return true
- } else {
- return false
- }
- } 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>
|