Browse Source

修改综合监模型表、视频智能监控表排序方式,更改默认时间排序

master
jiejie 9 months ago
parent
commit
4099d361b6
  1. 2
      src/hooks/system/useListPage.ts
  2. 49
      src/views/military/modules/ai/aiModel/components/DtAiModelForm.vue
  3. 59
      src/views/military/modules/ai/monitorModel/DtMonitorModel.data.ts
  4. 14
      src/views/military/modules/ai/monitorModel/DtMonitorModelList.vue
  5. 51
      src/views/military/modules/ai/monitorModel/components/DtMonitorModelForm.vue
  6. 18
      src/views/military/modules/equipmentManage/info/DtDeviceInfo.data.ts

2
src/hooks/system/useListPage.ts

@ -281,7 +281,7 @@ export function useListTable(tableProps: TableProps): [
// 发送请求之前调用的方法
function beforeFetch(params) {
// 默认以 createTime 降序排序
return Object.assign({ column: 'createTime', order: 'desc' }, params);
return Object.assign({ }, params);
}
// 合并方法

49
src/views/military/modules/ai/aiModel/components/DtAiModelForm.vue

@ -4,17 +4,17 @@
<a-row>
<a-col :span="24">
<a-form-item label="模型编号" v-bind="validateInfos.modelCode">
<a-input v-model:value="formData.modelCode" placeholder="请输入模型编号" :disabled="disabled"></a-input>
<a-input v-model:value="formData.modelCode" placeholder="请输入模型编号" :disabled="disabledForm.modelCode"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="模型名称" v-bind="validateInfos.modelName">
<a-input v-model:value="formData.modelName" placeholder="请输入模型名称" :disabled="disabled"></a-input>
<a-input v-model:value="formData.modelName" placeholder="请输入模型名称" :disabled="disabledForm.modelName"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" v-bind="validateInfos.remark">
<a-input v-model:value="formData.remark" placeholder="请输入备注" :disabled="disabled"></a-input>
<a-input v-model:value="formData.remark" placeholder="请输入备注" :disabled="disabledForm.remark"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="24">
@ -79,26 +79,36 @@
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {};
const validatorRules = {
modelCode: [{ required: true, message: '请输入模型编号!' },],
modelName: [{ required: true, message: '请输入模型名称!' }]
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
const disabledForm=ref({
modelCode:false,
modelName:false,
remark:false
})
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
// const disabled = computed(() => {
// if (props.formBpm === true) {
// if (props.formData.disabled === false) {
// return false;
// } else {
// return true;
// }
// }
// return props.formDisabled;
// });
/**
* 新增
*/
function add() {
edit({});
disabledForm.value.modelCode=false
disabledForm.value.modelName=false
disabledForm.value.remark=false
}
/**
@ -110,6 +120,15 @@
//
Object.assign(formData, record);
});
if(!props.formDisabled){//
disabledForm.value.modelCode=true
disabledForm.value.modelName=false
disabledForm.value.remark=false
}else{
disabledForm.value.modelCode=true
disabledForm.value.modelName=true
disabledForm.value.remark=true
}
}
/**

59
src/views/military/modules/ai/monitorModel/DtMonitorModel.data.ts

@ -2,12 +2,15 @@ import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { SortOrder } from 'ant-design-vue/lib/table/interface';
//列表数据
export const columns: BasicColumn[] = [
{
title: '模型编号',
align: "center",
dataIndex: 'modelCode',
// sorter: true,
// sortDirections:['ascend']
},
{
title: '模型名称',
@ -18,7 +21,8 @@ export const columns: BasicColumn[] = [
title: '备注',
align: "center",
dataIndex: 'remark'
}
},
// ,
// {
// title: '备用1',
@ -57,6 +61,7 @@ export const formSchema: FormSchema[] = [
label: '模型编号',
field: 'modelCode',
component: 'Input',
},
{
label: '模型名称',
@ -68,31 +73,32 @@ export const formSchema: FormSchema[] = [
field: 'remark',
component: 'Input',
},
{
label: '备用1',
field: 'field1',
component: 'Input',
},
{
label: '备用2',
field: 'field2',
component: 'Input',
},
{
label: '备用3',
field: 'field3',
component: 'Input',
},
{
label: '所属区域',
field: 'sysAreaCode',
component: 'Input',
},
{
label: '所属单位',
field: 'sysUnitCode',
component: 'Input',
},
// {
// label: '备用1',
// field: 'field1',
// component: 'Input',
// },
// {
// label: '备用2',
// field: 'field2',
// component: 'Input',
// },
// {
// label: '备用3',
// field: 'field3',
// component: 'Input',
// },
// {
// label: '所属区域',
// field: 'sysAreaCode',
// component: 'Input',
// },
// {
// label: '所属单位',
// field: 'sysUnitCode',
// component: 'Input',
// },
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
@ -101,3 +107,4 @@ export const formSchema: FormSchema[] = [
show: false,
},
];

14
src/views/military/modules/ai/monitorModel/DtMonitorModelList.vue

@ -207,13 +207,13 @@
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
},
},
// {
// label: '',
// popConfirm: {
// title: '',
// confirm: handleDelete.bind(null, record),
// },
// },
];
}

51
src/views/military/modules/ai/monitorModel/components/DtMonitorModelForm.vue

@ -4,18 +4,20 @@
<a-row>
<a-col :span="24">
<a-form-item label="模型编号" v-bind="validateInfos.modelCode" >
<a-input-number v-model:value="formData.modelCode" placeholder="请输入模型编号" style="width: 100%"
:disabled="disabled"></a-input-number>
<!-- <a-input-number v-model:value="formData.modelCode" placeholder="请输入模型编号" style="width: 100%" :disabled="disabled"></a-input-number> -->
<a-input-number v-model:value="formData.modelCode" placeholder="请输入模型编号" style="width: 100%" :disabled="disabledForm.modelCode"></a-input-number>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="模型名称" v-bind="validateInfos.modelName">
<a-input v-model:value="formData.modelName" placeholder="请输入模型名称" :disabled="disabled"></a-input>
<a-input v-model:value="formData.modelName" placeholder="请输入模型名称" :disabled="disabledForm.modelName"></a-input>
<!-- <a-input v-model:value="formData.modelName" placeholder="请输入模型名称" :disabled="disabled"></a-input> -->
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" v-bind="validateInfos.remark">
<a-input v-model:value="formData.remark" placeholder="请输入备注" :disabled="disabled"></a-input>
<a-input v-model:value="formData.remark" placeholder="请输入备注" :disabled="disabledForm.remark"></a-input>
<!-- <a-input v-model:value="formData.remark" placeholder="请输入备注" :disabled="disabled"></a-input> -->
</a-form-item>
</a-col>
<!-- <a-col :span="24">
@ -55,6 +57,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../DtMonitorModel.api';
import { Form } from 'ant-design-vue';
import { title } from 'process';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -62,6 +65,7 @@ const props = defineProps({
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
// const isShow=ref(true);
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
@ -85,25 +89,31 @@ const validatorRules = {
modelName: [{ required: true, message: '请输入模型名称!' }]
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
const disabledForm=ref({
modelCode:false,
modelName:false,
remark:false
})
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
// const disabled = computed(() => {
// if (props.formBpm === true) {
// if (props.formData.disabled === false) {
// return false;
// } else {
// return true;
// }
// }
// return props.formDisabled;
// });
/**
* 新增
*/
function add() {
edit({});
disabledForm.value.modelCode=false
disabledForm.value.modelName=false
disabledForm.value.remark=false
}
/**
@ -115,6 +125,15 @@ function edit(record) {
//
Object.assign(formData, record);
});
if(!props.formDisabled){//
disabledForm.value.modelCode=true
disabledForm.value.modelName=false
disabledForm.value.remark=false
}else{
disabledForm.value.modelCode=true
disabledForm.value.modelName=true
disabledForm.value.remark=true
}
}
/**

18
src/views/military/modules/equipmentManage/info/DtDeviceInfo.data.ts

@ -64,7 +64,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'netProtocol'
},
{
title:'数据协议类型',
title:'数据协议',
align:"center",
dataIndex:"dataProtocol"
},
@ -157,6 +157,7 @@ export const searchFormSchema: FormSchema[] = [
label: "所属站点",
field: 'deviceOwnerId',
component: 'JDictSelectTag',
defaultValue: '00001-00001-00002',
componentProps: {
dictCode: "ms_map_scene,scene_name,scene_id"
},
@ -211,7 +212,7 @@ export const searchFormSchema: FormSchema[] = [
// colProps: {span: 6},
// },
{
label: "协议类型",
label: "数据协议",
field: 'protocol',
component: 'JDictSelectTag',
componentProps: {
@ -219,6 +220,15 @@ export const searchFormSchema: FormSchema[] = [
},
colProps: { span: 6 },
},
{
label: "网络协议",
field: 'protocol',
component: 'JDictSelectTag',
componentProps: {
dictCode: "dt_device_net_protocol,protocol_name,protocol_type"
},
colProps: { span: 6 },
},
];
//表单数据
export const formSchema: FormSchema[] = [
@ -338,7 +348,7 @@ export const formSchema: FormSchema[] = [
},
},
{
label: '数据协议类型',
label: '数据协议',
field: 'dataProtocol',
component: 'JDictSelectTag',
componentProps:{
@ -347,7 +357,7 @@ export const formSchema: FormSchema[] = [
},
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '数据协议类型不能为空!' },
{ required: true, message: '数据协议不能为空!' },
];
},
},

Loading…
Cancel
Save