|
@@ -2,7 +2,7 @@
|
|
<BasicModal
|
|
<BasicModal
|
|
v-bind="$attrs"
|
|
v-bind="$attrs"
|
|
@register="register"
|
|
@register="register"
|
|
- title="设备入库"
|
|
|
|
|
|
+ :title="fileFlow.title"
|
|
@visible-change="handleVisibleChange"
|
|
@visible-change="handleVisibleChange"
|
|
@cancel="resetFields"
|
|
@cancel="resetFields"
|
|
@ok="handleSubmit"
|
|
@ok="handleSubmit"
|
|
@@ -23,7 +23,7 @@
|
|
import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { cameraAllType } from '/@/api/account';
|
|
import { cameraAllType } from '/@/api/account';
|
|
- import { cameraIn } from '/@/api/device';
|
|
|
|
|
|
+ import { cameraIn, updateCameraType } from '/@/api/device';
|
|
import { companyUploadExcel, downTemplate } from '/@/api/customer';
|
|
import { companyUploadExcel, downTemplate } from '/@/api/customer';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -37,6 +37,7 @@
|
|
const modelRef = ref({});
|
|
const modelRef = ref({});
|
|
const fileFlow = reactive({
|
|
const fileFlow = reactive({
|
|
file: null,
|
|
file: null,
|
|
|
|
+ title: '设备入库',
|
|
});
|
|
});
|
|
const { createMessage } = useMessage();
|
|
const { createMessage } = useMessage();
|
|
const schemas: FormSchema[] = [
|
|
const schemas: FormSchema[] = [
|
|
@@ -183,6 +184,7 @@
|
|
|
|
|
|
function onDataReceive(data) {
|
|
function onDataReceive(data) {
|
|
modelRef.value = data;
|
|
modelRef.value = data;
|
|
|
|
+ fileFlow.title = data.id ? '编辑' : '设备入库';
|
|
resetFields();
|
|
resetFields();
|
|
setFieldsValue({
|
|
setFieldsValue({
|
|
type: data.sceneName,
|
|
type: data.sceneName,
|
|
@@ -203,6 +205,7 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
const handleSubmit = async () => {
|
|
const handleSubmit = async () => {
|
|
|
|
+ modelRef.value
|
|
try {
|
|
try {
|
|
const params = await validate();
|
|
const params = await validate();
|
|
await cameraIn(params);
|
|
await cameraIn(params);
|