Showing
18 changed files
with
96 additions
and
82 deletions
| 1 | export default { | 1 | export default { | 
| 2 | ledgerListText: '台账列表', | 2 | ledgerListText: '台账列表', | 
| 3 | nameCode: '设备编码', | 3 | nameCode: '设备编码', | 
| 4 | - brandText: '设备编码', | 4 | + brandText: '设备品牌', | 
| 5 | modelNumText: '型号', | 5 | modelNumText: '型号', | 
| 6 | buyDate: '购买时间', | 6 | buyDate: '购买时间', | 
| 7 | productDate: '出厂日期', | 7 | productDate: '出厂日期', | 
| 1 | export default { | 1 | export default { | 
| 2 | listText: '巡检计划', | 2 | listText: '巡检计划', | 
| 3 | nameText: '名称', | 3 | nameText: '名称', | 
| 4 | - codeText: '记录编号', | ||
| 5 | - createCategoryText: '创建记录', | 4 | + codeText: '计划编号', | 
| 5 | + createCategoryText: '创建计划', | ||
| 6 | statusText: '计划状态', | 6 | statusText: '计划状态', | 
| 7 | typeNameText: '类型', | 7 | typeNameText: '类型', | 
| 8 | NOT_START: '未开始', | 8 | NOT_START: '未开始', | 
| @@ -29,6 +29,9 @@ | @@ -29,6 +29,9 @@ | ||
| 29 | </div> | 29 | </div> | 
| 30 | </template> | 30 | </template> | 
| 31 | </a-tree> | 31 | </a-tree> | 
| 32 | + <div v-else class="empty-tree" style="margin: 200px auto"> | ||
| 33 | + <a-empty :image="simpleImage" /> | ||
| 34 | + </div> | ||
| 32 | <categoryModal @register="registerModal" @handleReload="handleReload" /> | 35 | <categoryModal @register="registerModal" @handleReload="handleReload" /> | 
| 33 | </div> | 36 | </div> | 
| 34 | </PageWrapper> | 37 | </PageWrapper> | 
| @@ -39,13 +42,16 @@ | @@ -39,13 +42,16 @@ | ||
| 39 | import { categoryModal } from './components/index'; | 42 | import { categoryModal } from './components/index'; | 
| 40 | import { useModal } from '/@/components/Modal'; | 43 | import { useModal } from '/@/components/Modal'; | 
| 41 | import { deleteCategory, getAllCategory } from '/@/api/equipment/category'; | 44 | import { deleteCategory, getAllCategory } from '/@/api/equipment/category'; | 
| 42 | - import { ref, onMounted } from 'vue'; | 45 | + import { ref, onMounted } from 'vue'; | 
| 46 | + import { Empty } from 'ant-design-vue'; | ||
| 43 | import { useI18n } from '/@/hooks/web/useI18n'; | 47 | import { useI18n } from '/@/hooks/web/useI18n'; | 
| 44 | import { useMessage } from '/@/hooks/web/useMessage'; | 48 | import { useMessage } from '/@/hooks/web/useMessage'; | 
| 45 | const treeData = ref([]); // 声明为响应式变量 | 49 | const treeData = ref([]); // 声明为响应式变量 | 
| 46 | const { t } = useI18n(); | 50 | const { t } = useI18n(); | 
| 47 | const { createMessage } = useMessage(); | 51 | const { createMessage } = useMessage(); | 
| 48 | const searchKeyword = ref(''); | 52 | const searchKeyword = ref(''); | 
| 53 | + | ||
| 54 | + const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE; | ||
| 49 | // 递归转换函数 | 55 | // 递归转换函数 | 
| 50 | const transformTreeData = (data: any) => { | 56 | const transformTreeData = (data: any) => { | 
| 51 | return data?.map((item) => { | 57 | return data?.map((item) => { | 
| @@ -100,7 +106,6 @@ | @@ -100,7 +106,6 @@ | ||
| 100 | 106 | ||
| 101 | // 编辑 | 107 | // 编辑 | 
| 102 | const handleEdit = (record?: any) => { | 108 | const handleEdit = (record?: any) => { | 
| 103 | - console.log(record, 'record'); | ||
| 104 | openModal(true, { | 109 | openModal(true, { | 
| 105 | isUpdate: true, | 110 | isUpdate: true, | 
| 106 | record, | 111 | record, | 
| @@ -112,10 +112,6 @@ const [ | @@ -112,10 +112,6 @@ const [ | ||
| 112 | slots: { customRender: 'action' }, | 112 | slots: { customRender: 'action' }, | 
| 113 | fixed: 'right', | 113 | fixed: 'right', | 
| 114 | }, | 114 | }, | 
| 115 | - rowSelection: { | ||
| 116 | - type: 'checkbox', | ||
| 117 | - getCheckboxProps: () => {}, | ||
| 118 | - }, | ||
| 119 | }); | 115 | }); | 
| 120 | 116 | ||
| 121 | const handleReload = () => { | 117 | const handleReload = () => { | 
| @@ -4,9 +4,14 @@ import { useI18n } from '/@/hooks/web/useI18n'; | @@ -4,9 +4,14 @@ import { useI18n } from '/@/hooks/web/useI18n'; | ||
| 4 | export enum FormFieldsEnum { | 4 | export enum FormFieldsEnum { | 
| 5 | CODE = 'code', | 5 | CODE = 'code', | 
| 6 | CATEGORY_NAME = 'reason', | 6 | CATEGORY_NAME = 'reason', | 
| 7 | + CATEGORY_STATUS = 'status', | ||
| 7 | } | 8 | } | 
| 8 | 9 | ||
| 9 | const { t } = useI18n(); | 10 | const { t } = useI18n(); | 
| 11 | +const statusOptions = [ | ||
| 12 | + { label: t('equipment.errorReason.enableText'), value: 'ENABLE' }, | ||
| 13 | + { label: t('equipment.errorReason.disabledText'), value: 'DISABLE' }, | ||
| 14 | +]; | ||
| 10 | 15 | ||
| 11 | export const formSchema: FormSchema[] = [ | 16 | export const formSchema: FormSchema[] = [ | 
| 12 | { | 17 | { | 
| @@ -20,8 +25,17 @@ export const formSchema: FormSchema[] = [ | @@ -20,8 +25,17 @@ export const formSchema: FormSchema[] = [ | ||
| 20 | } | 25 | } | 
| 21 | }, | 26 | }, | 
| 22 | { | 27 | { | 
| 28 | + field: FormFieldsEnum.CATEGORY_STATUS, | ||
| 29 | + label: t('equipment.errorReason.statusText'), | ||
| 30 | + component: 'Select', | ||
| 31 | + componentProps: { | ||
| 32 | + options: statusOptions, | ||
| 33 | + disabled: 'disabled', | ||
| 34 | + }, | ||
| 35 | + }, | ||
| 36 | + { | ||
| 23 | field: FormFieldsEnum.CATEGORY_NAME, | 37 | field: FormFieldsEnum.CATEGORY_NAME, | 
| 24 | - label: t('application.api.text.categoryName'), | 38 | + label: t('equipment.errorReason.nameText'), | 
| 25 | component: 'Input', | 39 | component: 'Input', | 
| 26 | componentProps() { | 40 | componentProps() { | 
| 27 | return { | 41 | return { | 
| @@ -3,14 +3,11 @@ | @@ -3,14 +3,11 @@ | ||
| 3 | import { BasicForm, useForm } from '/@/components/Form'; | 3 | import { BasicForm, useForm } from '/@/components/Form'; | 
| 4 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 4 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 
| 5 | import { formSchema } from './config'; | 5 | import { formSchema } from './config'; | 
| 6 | - import { useI18n } from '/@/hooks/web/useI18n'; | ||
| 7 | import { JSONEditor } from '/@/components/CodeEditor'; | 6 | import { JSONEditor } from '/@/components/CodeEditor'; | 
| 8 | import { ApplicationApiItemType } from '/@/api/application/model/api'; | 7 | import { ApplicationApiItemType } from '/@/api/application/model/api'; | 
| 9 | 8 | ||
| 10 | const _emits = defineEmits(['success', 'register']); | 9 | const _emits = defineEmits(['success', 'register']); | 
| 11 | 10 | ||
| 12 | - const { t } = useI18n(); | ||
| 13 | - | ||
| 14 | const handleCount = ref<Number>(); // 0 新增 1 编辑 2 详情 | 11 | const handleCount = ref<Number>(); // 0 新增 1 编辑 2 详情 | 
| 15 | 12 | ||
| 16 | const recordData = ref<ApplicationApiItemType>(); | 13 | const recordData = ref<ApplicationApiItemType>(); | 
| @@ -22,11 +19,7 @@ | @@ -22,11 +19,7 @@ | ||
| 22 | }); | 19 | }); | 
| 23 | 20 | ||
| 24 | const cacheTitle = computed(() => | 21 | const cacheTitle = computed(() => | 
| 25 | - unref(handleCount) === 0 | ||
| 26 | - ? t('application.api.action.create') | ||
| 27 | - : unref(handleCount) === 1 | ||
| 28 | - ? t('application.api.action.edit') | ||
| 29 | - : t('application.api.action.detail') | 22 | + "故障详情" | 
| 30 | ); | 23 | ); | 
| 31 | 24 | ||
| 32 | const [registerDrawer, { setDrawerProps }] = useDrawerInner(async (data) => { | 25 | const [registerDrawer, { setDrawerProps }] = useDrawerInner(async (data) => { | 
| @@ -7,13 +7,6 @@ | @@ -7,13 +7,6 @@ | ||
| 7 | {{ t('equipment.errorReason.createCategoryText') }} | 7 | {{ t('equipment.errorReason.createCategoryText') }} | 
| 8 | </Button> | 8 | </Button> | 
| 9 | </Authority> | 9 | </Authority> | 
| 10 | - <Authority value="api:yt:errorReason:delete"> | ||
| 11 | - <Popconfirm :title="t('common.deleteConfirmText')" @confirm="handleDelete()"> | ||
| 12 | - <a-button color="error" :disabled="!isExistOption"> | ||
| 13 | - {{ t('common.batchDeleteText') }} | ||
| 14 | - </a-button> | ||
| 15 | - </Popconfirm> | ||
| 16 | - </Authority> | ||
| 17 | </template> | 10 | </template> | 
| 18 | <template #status="{ record }"> | 11 | <template #status="{ record }"> | 
| 19 | <Switch | 12 | <Switch | 
| @@ -69,14 +62,11 @@ import { | @@ -69,14 +62,11 @@ import { | ||
| 69 | getEquipmentErrorList | 62 | getEquipmentErrorList | 
| 70 | } from '/@/api/equipment/errorReason'; | 63 | } from '/@/api/equipment/errorReason'; | 
| 71 | import { columns, searchFormSchema } from './index'; | 64 | import { columns, searchFormSchema } from './index'; | 
| 72 | -import { getAuthCache } from '/@/utils/auth'; | ||
| 73 | -import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | ||
| 74 | -import {Button, Popconfirm, Switch} from 'ant-design-vue'; | 65 | +import {Button, Switch} from 'ant-design-vue'; | 
| 75 | import {Authority} from "/@/components/Authority"; | 66 | import {Authority} from "/@/components/Authority"; | 
| 76 | import {useModal} from "/@/components/Modal"; | 67 | import {useModal} from "/@/components/Modal"; | 
| 77 | import { reasonModal } from './components/index'; | 68 | import { reasonModal } from './components/index'; | 
| 78 | import {useMessage} from "/@/hooks/web/useMessage"; | 69 | import {useMessage} from "/@/hooks/web/useMessage"; | 
| 79 | -import {useBatchOperation} from "/@/utils/useBatchOperation"; | ||
| 80 | import { useDrawer} from "/@/components/Drawer"; | 70 | import { useDrawer} from "/@/components/Drawer"; | 
| 81 | 71 | ||
| 82 | import {FormDrawer} from "./components/FormDrawer/index"; | 72 | import {FormDrawer} from "./components/FormDrawer/index"; | 
| @@ -87,7 +77,7 @@ const { createMessage } = useMessage(); | @@ -87,7 +77,7 @@ const { createMessage } = useMessage(); | ||
| 87 | 77 | ||
| 88 | const [ | 78 | const [ | 
| 89 | registerTable, | 79 | registerTable, | 
| 90 | - { reload, setLoading, getSelectRowKeys, setSelectedRowKeys, getRowSelection }, | 80 | + { reload, setLoading, getSelectRowKeys, setSelectedRowKeys }, | 
| 91 | ] = useTable({ | 81 | ] = useTable({ | 
| 92 | title: t('equipment.errorReason.listText'), | 82 | title: t('equipment.errorReason.listText'), | 
| 93 | api: getEquipmentErrorList, | 83 | api: getEquipmentErrorList, | 
| @@ -109,17 +99,7 @@ const [ | @@ -109,17 +99,7 @@ const [ | ||
| 109 | slots: { customRender: 'action' }, | 99 | slots: { customRender: 'action' }, | 
| 110 | fixed: 'right', | 100 | fixed: 'right', | 
| 111 | }, | 101 | }, | 
| 112 | - rowSelection: { | ||
| 113 | - type: 'checkbox', | ||
| 114 | - getCheckboxProps: (record: any) => { | ||
| 115 | - return { | ||
| 116 | - disabled: | ||
| 117 | - getAuthCache(USER_INFO_KEY).id === record.id ? !!record.status : true, | ||
| 118 | - }; | ||
| 119 | - }, | ||
| 120 | - }, | ||
| 121 | }); | 102 | }); | 
| 122 | -const { isExistOption } = useBatchOperation(getRowSelection, setSelectedRowKeys); | ||
| 123 | const [registerApplicationApiFormDrawer, { openDrawer }] = useDrawer(); | 103 | const [registerApplicationApiFormDrawer, { openDrawer }] = useDrawer(); | 
| 124 | const [registerModal, { openModal }] = useModal(); | 104 | const [registerModal, { openModal }] = useModal(); | 
| 125 | 105 | 
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | import {computed, nextTick, reactive, ref} from "vue"; | 50 | import {computed, nextTick, reactive, ref} from "vue"; | 
| 51 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 51 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 
| 52 | import { SchemaFiled} from "../../config/enum"; | 52 | import { SchemaFiled} from "../../config/enum"; | 
| 53 | -import {BasicForm,useForm} from "/@/components/Form"; | 53 | +import {BasicForm, FileItem, useForm} from "/@/components/Form"; | 
| 54 | import {formSchema} from "../../config/data"; | 54 | import {formSchema} from "../../config/data"; | 
| 55 | import {useHooks} from "/@/views/report/config/hooks/index.hooks"; | 55 | import {useHooks} from "/@/views/report/config/hooks/index.hooks"; | 
| 56 | import {getUserListByOrg,ledgerEditDetailPage,saveLedger } from "/@/api/equipment/ledger" | 56 | import {getUserListByOrg,ledgerEditDetailPage,saveLedger } from "/@/api/equipment/ledger" | 
| @@ -59,6 +59,7 @@ import {useThrottleFn} from "@vueuse/shared/index"; | @@ -59,6 +59,7 @@ import {useThrottleFn} from "@vueuse/shared/index"; | ||
| 59 | import {useMessage} from "/@/hooks/web/useMessage"; | 59 | import {useMessage} from "/@/hooks/web/useMessage"; | 
| 60 | import {useI18n} from "/@/hooks/web/useI18n"; | 60 | import {useI18n} from "/@/hooks/web/useI18n"; | 
| 61 | import { useResetOrganizationTree, OrganizationIdTree } from '/@/views/common/organizationIdTree'; | 61 | import { useResetOrganizationTree, OrganizationIdTree } from '/@/views/common/organizationIdTree'; | 
| 62 | +import {buildUUID} from "/@/utils/uuid"; | ||
| 62 | const { | 63 | const { | 
| 63 | setDefaultTime, | 64 | setDefaultTime, | 
| 64 | disableCustomWeekly, | 65 | disableCustomWeekly, | 
| @@ -116,6 +117,11 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async ( | @@ -116,6 +117,11 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async ( | ||
| 116 | } | 117 | } | 
| 117 | selectedItem.value.username = data?.record?.directorName || ''; | 118 | selectedItem.value.username = data?.record?.directorName || ''; | 
| 118 | selectedItem.value.id = data?.record?.directorId || ''; | 119 | selectedItem.value.id = data?.record?.directorId || ''; | 
| 120 | + if (data?.record?.deviceImg) { | ||
| 121 | + setFieldsValue({ | ||
| 122 | + image: [{ uid: buildUUID(), name: 'name', url: data?.record?.deviceImg } as FileItem], | ||
| 123 | + }); | ||
| 124 | + } | ||
| 119 | setFieldsValue(setDefaultTime()); | 125 | setFieldsValue(setDefaultTime()); | 
| 120 | updateSchema(disableCustomWeekly(0)); | 126 | updateSchema(disableCustomWeekly(0)); | 
| 121 | if (businessText.value === 'add') return; | 127 | if (businessText.value === 'add') return; | 
| @@ -163,6 +169,7 @@ const getValue = async () => { | @@ -163,6 +169,7 @@ const getValue = async () => { | ||
| 163 | const data = { | 169 | const data = { | 
| 164 | ...values, | 170 | ...values, | 
| 165 | buyDate: values.buyDate?.format('YYYY-MM-DD hh:mm:ss'), | 171 | buyDate: values.buyDate?.format('YYYY-MM-DD hh:mm:ss'), | 
| 172 | + deviceImg: values.image?.[0]?.url, | ||
| 166 | productDate: values.productDate?.format('YYYY-MM-DD hh:mm:ss'), | 173 | productDate: values.productDate?.format('YYYY-MM-DD hh:mm:ss'), | 
| 167 | receiveDate: values.receiveDate?.format('YYYY-MM-DD hh:mm:ss'), | 174 | receiveDate: values.receiveDate?.format('YYYY-MM-DD hh:mm:ss'), | 
| 168 | registeDate: values.registeDate?.format('YYYY-MM-DD hh:mm:ss'), | 175 | registeDate: values.registeDate?.format('YYYY-MM-DD hh:mm:ss'), | 
| @@ -4,6 +4,8 @@ const { t } = useI18n(); | @@ -4,6 +4,8 @@ const { t } = useI18n(); | ||
| 4 | import { CategoryTreeSelect } from '../../../common/CategoryTreeSelect'; | 4 | import { CategoryTreeSelect } from '../../../common/CategoryTreeSelect'; | 
| 5 | import { OrgTreeSelect } from '../../../common/OrgTreeSelect'; | 5 | import { OrgTreeSelect } from '../../../common/OrgTreeSelect'; | 
| 6 | import {supplierListPull} from "/@/api/equipment/supplier"; | 6 | import {supplierListPull} from "/@/api/equipment/supplier"; | 
| 7 | +import {uploadThumbnail} from "/@/api/configuration/center/configurationCenter"; | ||
| 8 | +import {createImgPreview} from "/@/components/Preview"; | ||
| 7 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); | 9 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); | 
| 8 | useComponentRegister('CategoryTreeSelect', CategoryTreeSelect); | 10 | useComponentRegister('CategoryTreeSelect', CategoryTreeSelect); | 
| 9 | const statusOptions = [ | 11 | const statusOptions = [ | 
| @@ -13,6 +15,40 @@ const statusOptions = [ | @@ -13,6 +15,40 @@ const statusOptions = [ | ||
| 13 | ]; | 15 | ]; | 
| 14 | export const formSchema: BFormSchema[] = [ | 16 | export const formSchema: BFormSchema[] = [ | 
| 15 | { | 17 | { | 
| 18 | + field: 'image', | ||
| 19 | + label: t('deviceManagement.product.imageText'), | ||
| 20 | + component: 'ApiUpload', | ||
| 21 | + changeEvent: 'update:fileList', | ||
| 22 | + valueField: 'fileList', | ||
| 23 | + componentProps: ({ formModel }) => { | ||
| 24 | + return { | ||
| 25 | + listType: 'picture-card', | ||
| 26 | + maxFileLimit: 1, | ||
| 27 | + accept: '.png,.jpg,.jpeg,.gif', | ||
| 28 | + api: async (file: File) => { | ||
| 29 | + try { | ||
| 30 | + const formData = new FormData(); | ||
| 31 | + formData.set('file', file); | ||
| 32 | + const { fileStaticUri, fileName } = await uploadThumbnail(formData); | ||
| 33 | + return { | ||
| 34 | + uid: fileStaticUri, | ||
| 35 | + name: fileName, | ||
| 36 | + url: fileStaticUri, | ||
| 37 | + }; | ||
| 38 | + } catch (error) { | ||
| 39 | + return {}; | ||
| 40 | + } | ||
| 41 | + }, | ||
| 42 | + onPreview: (fileList) => { | ||
| 43 | + createImgPreview({ imageList: [fileList.url!] }); | ||
| 44 | + }, | ||
| 45 | + onDelete(url: string) { | ||
| 46 | + formModel.deleteUrl = url!; | ||
| 47 | + }, | ||
| 48 | + }; | ||
| 49 | + }, | ||
| 50 | + }, | ||
| 51 | + { | ||
| 16 | field: 'code', | 52 | field: 'code', | 
| 17 | label: t('equipment.ledger.nameCode'), | 53 | label: t('equipment.ledger.nameCode'), | 
| 18 | component: 'Input', | 54 | component: 'Input', | 
| @@ -69,6 +69,12 @@ export enum DeviceListAuthEnum { | @@ -69,6 +69,12 @@ export enum DeviceListAuthEnum { | ||
| 69 | // 表格列数据 | 69 | // 表格列数据 | 
| 70 | export const columns: BasicColumn[] = [ | 70 | export const columns: BasicColumn[] = [ | 
| 71 | { | 71 | { | 
| 72 | + title: t('repair.order.situationImg'), | ||
| 73 | + dataIndex: 'deviceImg', | ||
| 74 | + slots: { customRender: 'deviceImg' }, | ||
| 75 | + width: 100, | ||
| 76 | + }, | ||
| 77 | + { | ||
| 72 | title: t('business.deviceStatusText'), | 78 | title: t('business.deviceStatusText'), | 
| 73 | dataIndex: 'status', | 79 | dataIndex: 'status', | 
| 74 | width: 110, | 80 | width: 110, | 
| @@ -10,6 +10,18 @@ | @@ -10,6 +10,18 @@ | ||
| 10 | </a-button> | 10 | </a-button> | 
| 11 | </Authority> | 11 | </Authority> | 
| 12 | </template> | 12 | </template> | 
| 13 | + <template #deviceImg="{ record }"> | ||
| 14 | + <TableImg | ||
| 15 | + :size="30" | ||
| 16 | + :showBadge="false" | ||
| 17 | + :simpleShow="true" | ||
| 18 | + :imgList=" | ||
| 19 | + typeof record.deviceImg !== 'undefined' && record.deviceImg !== '' && record.deviceImg != null | ||
| 20 | + ? [record.deviceImg] | ||
| 21 | + : null | ||
| 22 | + " | ||
| 23 | + /> | ||
| 24 | + </template> | ||
| 13 | <template #status="{ record }"> | 25 | <template #status="{ record }"> | 
| 14 | <Tag | 26 | <Tag | 
| 15 | :color=" | 27 | :color=" | 
| @@ -66,7 +78,7 @@ import { PageWrapper } from '/@/components/Page'; | @@ -66,7 +78,7 @@ import { PageWrapper } from '/@/components/Page'; | ||
| 66 | import { LedgerDrawer } from "./components/modal/index" | 78 | import { LedgerDrawer } from "./components/modal/index" | 
| 67 | const searchInfo = reactive<Recordable>({}); | 79 | const searchInfo = reactive<Recordable>({}); | 
| 68 | const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo,'equipment'); | 80 | const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo,'equipment'); | 
| 69 | -import {BasicTable, TableAction, useTable} from "/@/components/Table"; | 81 | +import {BasicTable, TableAction, TableImg, useTable} from "/@/components/Table"; | 
| 70 | import {OrganizationIdTree, useResetOrganizationTree} from "/@/views/common/organizationIdTree"; | 82 | import {OrganizationIdTree, useResetOrganizationTree} from "/@/views/common/organizationIdTree"; | 
| 71 | import { getLedgerList, deleteLedger } from "/@/api/equipment/ledger" | 83 | import { getLedgerList, deleteLedger } from "/@/api/equipment/ledger" | 
| 72 | import { | 84 | import { | 
| @@ -77,7 +89,7 @@ import { SbStatusEnum } from '/@/enums/deviceEnum'; | @@ -77,7 +89,7 @@ import { SbStatusEnum } from '/@/enums/deviceEnum'; | ||
| 77 | 89 | ||
| 78 | import {useI18n} from "/@/hooks/web/useI18n"; | 90 | import {useI18n} from "/@/hooks/web/useI18n"; | 
| 79 | import {authBtn} from "/@/enums/roleEnum"; | 91 | import {authBtn} from "/@/enums/roleEnum"; | 
| 80 | -import {Button, Tag} from "ant-design-vue"; | 92 | +import {Tag} from "ant-design-vue"; | 
| 81 | import {Authority} from "/@/components/Authority"; | 93 | import {Authority} from "/@/components/Authority"; | 
| 82 | import {getAuthCache} from "/@/utils/auth"; | 94 | import {getAuthCache} from "/@/utils/auth"; | 
| 83 | import {USER_INFO_KEY} from "/@/enums/cacheEnum"; | 95 | import {USER_INFO_KEY} from "/@/enums/cacheEnum"; | 
| @@ -99,11 +111,6 @@ const [ | @@ -99,11 +111,6 @@ const [ | ||
| 99 | reload, | 111 | reload, | 
| 100 | setLoading, | 112 | setLoading, | 
| 101 | setSelectedRowKeys, | 113 | setSelectedRowKeys, | 
| 102 | - getForm, | ||
| 103 | - getSelectRowKeys, | ||
| 104 | - setProps, | ||
| 105 | - getRowSelection, | ||
| 106 | - clearSelectedRowKeys, | ||
| 107 | }, | 114 | }, | 
| 108 | ] = useTable({ | 115 | ] = useTable({ | 
| 109 | title: t('equipment.ledger.ledgerListText'), | 116 | title: t('equipment.ledger.ledgerListText'), | 
| @@ -140,10 +147,6 @@ const [ | @@ -140,10 +147,6 @@ const [ | ||
| 140 | slots: { customRender: 'action' }, | 147 | slots: { customRender: 'action' }, | 
| 141 | fixed: 'right', | 148 | fixed: 'right', | 
| 142 | }, | 149 | }, | 
| 143 | - rowSelection: { | ||
| 144 | - type: 'checkbox', | ||
| 145 | - getCheckboxProps: (record: any) => {}, | ||
| 146 | - }, | ||
| 147 | }); | 150 | }); | 
| 148 | 151 | ||
| 149 | 152 | 
| @@ -72,10 +72,6 @@ const [ | @@ -72,10 +72,6 @@ const [ | ||
| 72 | slots: { customRender: 'action' }, | 72 | slots: { customRender: 'action' }, | 
| 73 | fixed: 'right', | 73 | fixed: 'right', | 
| 74 | }, | 74 | }, | 
| 75 | - rowSelection: { | ||
| 76 | - type: 'checkbox', | ||
| 77 | - getCheckboxProps: () => {}, | ||
| 78 | - }, | ||
| 79 | }); | 75 | }); | 
| 80 | 76 | ||
| 81 | const handleReload = () => { | 77 | const handleReload = () => { | 
| @@ -149,10 +149,6 @@ const [ | @@ -149,10 +149,6 @@ const [ | ||
| 149 | slots: { customRender: 'action' }, | 149 | slots: { customRender: 'action' }, | 
| 150 | fixed: 'right', | 150 | fixed: 'right', | 
| 151 | }, | 151 | }, | 
| 152 | - rowSelection: { | ||
| 153 | - type: 'checkbox', | ||
| 154 | - getCheckboxProps: () => {}, | ||
| 155 | - }, | ||
| 156 | }); | 152 | }); | 
| 157 | 153 | ||
| 158 | const handleDelete = async (record?: any) => { | 154 | const handleDelete = async (record?: any) => { | 
| @@ -108,10 +108,6 @@ | @@ -108,10 +108,6 @@ | ||
| 108 | slots: { customRender: 'action' }, | 108 | slots: { customRender: 'action' }, | 
| 109 | fixed: 'right', | 109 | fixed: 'right', | 
| 110 | }, | 110 | }, | 
| 111 | - rowSelection: { | ||
| 112 | - type: 'checkbox', | ||
| 113 | - getCheckboxProps: () => {}, | ||
| 114 | - }, | ||
| 115 | }); | 111 | }); | 
| 116 | 112 | ||
| 117 | const handleDelete = async (record?: any) => { | 113 | const handleDelete = async (record?: any) => { | 
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | </a-row> | 21 | </a-row> | 
| 22 | <a-row :gutter="16"> | 22 | <a-row :gutter="16"> | 
| 23 | <a-col :span="12"> | 23 | <a-col :span="12"> | 
| 24 | - <a-form-item label="保养设备" name="status"> | 24 | + <a-form-item label="状态" name="status"> | 
| 25 | <a-select | 25 | <a-select | 
| 26 | v-model:value="form.status" | 26 | v-model:value="form.status" | 
| 27 | :options="statusOptions" | 27 | :options="statusOptions" | 
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | /> | 69 | /> | 
| 70 | </div> | 70 | </div> | 
| 71 | </template> | 71 | </template> | 
| 72 | - <template #checkPlanId="{ text, record, index }"> | 72 | + <template #checkPlanId="{ record }"> | 
| 73 | <div> | 73 | <div> | 
| 74 | <a-select | 74 | <a-select | 
| 75 | v-model:value="record.checkPlanId" | 75 | v-model:value="record.checkPlanId" | 
| @@ -80,12 +80,12 @@ | @@ -80,12 +80,12 @@ | ||
| 80 | /> | 80 | /> | 
| 81 | </div> | 81 | </div> | 
| 82 | </template> | 82 | </template> | 
| 83 | - <template #preserveDetail="{ text, record, index }"> | 83 | + <template #preserveDetail="{ record }"> | 
| 84 | <div> | 84 | <div> | 
| 85 | <a-textarea v-model:value="record.preserveDetail" :disabled="isViewMode"/> | 85 | <a-textarea v-model:value="record.preserveDetail" :disabled="isViewMode"/> | 
| 86 | </div> | 86 | </div> | 
| 87 | </template> | 87 | </template> | 
| 88 | - <template #operation="{ text, record, index }"> | 88 | + <template #operation="{ index }"> | 
| 89 | <div> | 89 | <div> | 
| 90 | <a-button type="link" @click="handleDelete(index)" :disabled="isViewMode">删除</a-button> | 90 | <a-button type="link" @click="handleDelete(index)" :disabled="isViewMode">删除</a-button> | 
| 91 | </div> | 91 | </div> | 
| @@ -101,8 +101,6 @@ import { ref, onMounted, watch } from 'vue'; | @@ -101,8 +101,6 @@ import { ref, onMounted, watch } from 'vue'; | ||
| 101 | import { getLedgerList } from "/@/api/equipment/ledger"; | 101 | import { getLedgerList } from "/@/api/equipment/ledger"; | 
| 102 | import { getPlanList } from "/@/api/equipment/chenkPlan"; | 102 | import { getPlanList } from "/@/api/equipment/chenkPlan"; | 
| 103 | import { useI18n } from "/@/hooks/web/useI18n"; | 103 | import { useI18n } from "/@/hooks/web/useI18n"; | 
| 104 | -import { message } from 'ant-design-vue'; | ||
| 105 | - | ||
| 106 | 104 | ||
| 107 | const Options = ref([]); | 105 | const Options = ref([]); | 
| 108 | const planOptions = ref([]); | 106 | const planOptions = ref([]); | 
| @@ -141,10 +141,6 @@ | @@ -141,10 +141,6 @@ | ||
| 141 | slots: { customRender: 'action' }, | 141 | slots: { customRender: 'action' }, | 
| 142 | fixed: 'right', | 142 | fixed: 'right', | 
| 143 | }, | 143 | }, | 
| 144 | - rowSelection: { | ||
| 145 | - type: 'checkbox', | ||
| 146 | - getCheckboxProps: () => {}, | ||
| 147 | - }, | ||
| 148 | }); | 144 | }); | 
| 149 | 145 | ||
| 150 | // 新增 | 146 | // 新增 | 
| @@ -114,10 +114,6 @@ const [ | @@ -114,10 +114,6 @@ const [ | ||
| 114 | slots: { customRender: 'action' }, | 114 | slots: { customRender: 'action' }, | 
| 115 | fixed: 'right', | 115 | fixed: 'right', | 
| 116 | }, | 116 | }, | 
| 117 | - rowSelection: { | ||
| 118 | - type: 'checkbox', | ||
| 119 | - getCheckboxProps: () => {}, | ||
| 120 | - }, | ||
| 121 | }); | 117 | }); | 
| 122 | 118 | ||
| 123 | const handleDelete = async (record?: any) => { | 119 | const handleDelete = async (record?: any) => { | 
| @@ -135,10 +135,6 @@ | @@ -135,10 +135,6 @@ | ||
| 135 | slots: { customRender: 'action' }, | 135 | slots: { customRender: 'action' }, | 
| 136 | fixed: 'right', | 136 | fixed: 'right', | 
| 137 | }, | 137 | }, | 
| 138 | - rowSelection: { | ||
| 139 | - type: 'checkbox', | ||
| 140 | - getCheckboxProps: () => {}, | ||
| 141 | - }, | ||
| 142 | }); | 138 | }); | 
| 143 | 139 | ||
| 144 | const handleReload = () => { | 140 | const handleReload = () => { |