gaoshp
2024-11-03 3e091224ab26252d8624b42b461ba773ee8bee0f
src/views/tpm/machine/Dialog.vue
@@ -480,7 +480,7 @@
                    }))
                }
            })
            this.$HTTP.get('/api/blade-cps/device-types/page?keyWord=&current=1&size=-1').then(res => {
            this.$HTTP.get('/api/smis/device-types/page?keyWord=&current=1&size=-1').then(res => {
                if (res.code === 200) {
                    this.options.machineTypeId = res.data.records.map(item => ({
                        label: item.name,
@@ -488,17 +488,17 @@
                    }))
                }
            })
            this.$HTTP.get('/api/blade-cps/employee/tree').then(res => {
            this.$HTTP.get('/api/smis/employee/tree').then(res => {
                if (res.code === 200) {
                    this.options.employeeId = res.data
                }
            })
            this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => {
            this.$HTTP.get('/api/smis/group/tree?groupCategory=1&groupType=group_machine').then(res => {
                if (res.code === 200) {
                    this.options.groupId = res.data
                }
            })
            this.$HTTP.get('/api/blade-cps/organization/tree?groupType=group_organization&groupCategory=1').then(res => {
            this.$HTTP.get('/api/smis/organization/tree?groupType=group_organization&groupCategory=1').then(res => {
                if (res.code === 200) {
                    this.options.organizationId = res.data
                }
@@ -514,7 +514,7 @@
                this.form[item] = ''
            })
            if (params.id) {
                this.$HTTP.get(`/api/blade-cps/machine/detail/${params.id}`).then(res => {
                this.$HTTP.get(`/api/smis/machine/detail/${params.id}`).then(res => {
                    if (res.code === 200) {
                        this.form = {
                            ...this.form,
@@ -542,11 +542,11 @@
                    let res
                    try {
                        if (this.form.id) {
                            res = await this.$HTTP.put('/api/blade-cps/machine', data).catch(() => {
                            res = await this.$HTTP.put('/api/smis/machine', data).catch(() => {
                                throw new Error()
                            })
                        } else {
                            res = await this.$HTTP.post('/api/blade-cps/machine', data).catch(() => {
                            res = await this.$HTTP.post('/api/smis/machine', data).catch(() => {
                                throw new Error()
                            })
                        }