物联设备BUG处理
This commit is contained in:
parent
22ea566dbf
commit
d53327e7ed
|
|
@ -52,6 +52,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<DevicePreviewModal ref="previewDrawer" @success="handleSuccess" />
|
||||
<CameraPreviewModal ref="cameraViewRef"></CameraPreviewModal>
|
||||
<DeviceLogModal ref="logDrawer" @success="handleSuccess" />
|
||||
<DeviceBrokenModal ref="brokenDrawer" @success="handleSuccess" />
|
||||
<DeviceGhModal ref="ghDrawer" @success="handleSuccess" />
|
||||
|
|
@ -73,11 +74,13 @@
|
|||
import DeviceGhModal from "./components/DeviceGhModal.vue";
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPreviewModal.vue'
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const previewDrawer = ref();
|
||||
const logDrawer = ref();
|
||||
const cameraViewRef = ref();
|
||||
const brokenDrawer = ref();
|
||||
const ghDrawer = ref();
|
||||
const tipVisible = ref(false);
|
||||
|
|
@ -150,6 +153,11 @@
|
|||
*/
|
||||
function getTableAction(record){
|
||||
return [
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handleCameraView.bind(null, record,"预览"),
|
||||
ifShow: record.onlineStatus!='待集成' && record.deviceType == 'SURVEILLANCECAMERA'
|
||||
},
|
||||
{
|
||||
label: '绑定区域',
|
||||
onClick: handleDeviceGh.bind(null, record,"绑定"),
|
||||
|
|
@ -168,6 +176,16 @@
|
|||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览
|
||||
*/
|
||||
function handleCameraView(record: Recordable) {
|
||||
console.log(record);
|
||||
record.streamType = 1;
|
||||
cameraViewRef.value.disableSubmit = true;
|
||||
cameraViewRef.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 报损
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ const confirmLoading = ref<boolean>(false);
|
|||
const validatorRules = {
|
||||
remarks: [{ required: true, message: '请填写备注!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
const { resetFields, clearValidate, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
|
|
@ -80,7 +80,7 @@ function add() {
|
|||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
async function edit(record) {
|
||||
isUpdate.value = true;
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
|
|
@ -95,6 +95,7 @@ function edit(record) {
|
|||
Object.assign(formData, tmpData);
|
||||
formData.remarks = '';
|
||||
});
|
||||
await clearValidate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ const confirmLoading = ref<boolean>(false);
|
|||
//表单验证
|
||||
const validatorRules = {
|
||||
nuId: [{ required: true, message: '请选择区域!'},],
|
||||
remarks: [{ required: true, message: '请填写备注!'},],
|
||||
// remarks: [{ required: true, message: '请填写备注!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
const { resetFields, clearValidate, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
|
|
@ -94,7 +94,7 @@ function add() {
|
|||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
async function edit(record) {
|
||||
getNuInfos();
|
||||
isUpdate.value = true;
|
||||
nextTick(() => {
|
||||
|
|
@ -110,6 +110,7 @@ function edit(record) {
|
|||
Object.assign(formData, tmpData);
|
||||
formData.remarks = '';
|
||||
});
|
||||
await clearValidate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const confirmLoading = ref<boolean>(false);
|
|||
const validatorRules = {
|
||||
sn: [{ required: true, message: '请填写设备标识!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
const { resetFields, clearValidate, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
|
|
@ -89,7 +89,7 @@ function add() {
|
|||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
async function edit(record) {
|
||||
isUpdate.value = true;
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
|
|
@ -103,6 +103,7 @@ function edit(record) {
|
|||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
await clearValidate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue