|
@@ -16,7 +16,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</scTable>
|
|
</scTable>
|
|
|
|
|
|
|
|
- <record-detail v-if="dialog" ref="recordRef" @success="refreshTable" @closed="dialog = false"></record-detail>
|
|
|
|
|
|
|
+ <record-detail v-if="dialog" ref="recordRef" :projectId="props.isTemp ? 1 : TOOL.data.get('PROJECT_ID')" @success="refreshTable" @closed="dialog = false"></record-detail>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -30,10 +30,12 @@ import recordDetail from "./detail";
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
options: { type: Object, default: () => {} },
|
|
options: { type: Object, default: () => {} },
|
|
|
|
|
+ isTemp: { type: Boolean, default: false },
|
|
|
hideHandler: { type: Boolean, default: false }
|
|
hideHandler: { type: Boolean, default: false }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const proConfig = reactive({
|
|
const proConfig = reactive({
|
|
|
|
|
+ visible: !props.isTemp,
|
|
|
storageKey: "PROJECT",
|
|
storageKey: "PROJECT",
|
|
|
resetValue: TOOL.data.get("PROJECT_ID"),
|
|
resetValue: TOOL.data.get("PROJECT_ID"),
|
|
|
optionProps: { label: "projectName", value: "fpiId" },
|
|
optionProps: { label: "projectName", value: "fpiId" },
|
|
@@ -69,6 +71,7 @@ const formConfig = reactive({
|
|
|
data: {
|
|
data: {
|
|
|
orderBy: "createTime_desc",
|
|
orderBy: "createTime_desc",
|
|
|
projectId: TOOL.data.get("PROJECT_ID"),
|
|
projectId: TOOL.data.get("PROJECT_ID"),
|
|
|
|
|
+ fpiIdNot: 1,
|
|
|
createTime: [moment().startOf("month").format("YYYY-MM-DD HH:mm:ss"), moment().format("YYYY-MM-DD HH:mm:ss")]
|
|
createTime: [moment().startOf("month").format("YYYY-MM-DD HH:mm:ss"), moment().format("YYYY-MM-DD HH:mm:ss")]
|
|
|
},
|
|
},
|
|
|
items: [
|
|
items: [
|
|
@@ -76,13 +79,14 @@ const formConfig = reactive({
|
|
|
mapFormItemDatePicker("createTime", "抓拍时间", datetimerangeConfig),
|
|
mapFormItemDatePicker("createTime", "抓拍时间", datetimerangeConfig),
|
|
|
mapFormItemInput("licensePlate", "车牌号", { span: 5 }),
|
|
mapFormItemInput("licensePlate", "车牌号", { span: 5 }),
|
|
|
mapFormItemSelect("carType", "车辆类型", selectConfig),
|
|
mapFormItemSelect("carType", "车辆类型", selectConfig),
|
|
|
- mapFormItemSelect("alarmType", "识别结果", { ...selectConfig, options: carWashDic.alarmType.map((label, value) => ({ label, value })) }),
|
|
|
|
|
|
|
+ mapFormItemSelect("alarmType", "识别结果", { ...selectConfig, options: carWashDic.alarmType.map((label, value) => ({ label, value })).slice(1) }),
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const paramsColums = reactive([
|
|
const paramsColums = reactive([
|
|
|
{ column: "orderBy" },
|
|
{ column: "orderBy" },
|
|
|
- { column: "fpiId", field: "projectId" },
|
|
|
|
|
|
|
+ { column: "fpiId", field: props.isTemp ? "fpiIdNot" : "projectId" },
|
|
|
|
|
+ !props.isTemp && { column: "fpiIdNot" },
|
|
|
{ column: "licensePlate" },
|
|
{ column: "licensePlate" },
|
|
|
{ column: "carType" },
|
|
{ column: "carType" },
|
|
|
{ column: "alarmType" },
|
|
{ column: "alarmType" },
|
|
@@ -91,7 +95,9 @@ const paramsColums = reactive([
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
const columns = reactive([
|
|
const columns = reactive([
|
|
|
|
|
+ { visible: !props.hideHandler, type: "checkbox", fixed: "left", width: 40 },
|
|
|
{ type: "seq", fixed: "left", width: 60 },
|
|
{ type: "seq", fixed: "left", width: 60 },
|
|
|
|
|
+ { type: "html", field: "projectName", title: "项目名称", minWidth: 160, sortable: true, formatter: ({ cellValue, row }) => cellValue || row.fpiId == 1 ? "模版项目" : XEUtils.get(XEUtils.find(TOOL.data.get("PROJECT"), item => item.fpiId == row.fpiId), "projectName") },
|
|
|
{ type: "html", field: "captureTime", title: "抓拍时间", minWidth: 160, sortable: true },
|
|
{ type: "html", field: "captureTime", title: "抓拍时间", minWidth: 160, sortable: true },
|
|
|
{ type: "html", field: "enterTime", title: "车辆入场时间", minWidth: 160, sortable: true },
|
|
{ type: "html", field: "enterTime", title: "车辆入场时间", minWidth: 160, sortable: true },
|
|
|
{ type: "html", field: "leaveTime", title: "车辆出场时间", minWidth: 160, sortable: true },
|
|
{ type: "html", field: "leaveTime", title: "车辆出场时间", minWidth: 160, sortable: true },
|
|
@@ -112,6 +118,7 @@ const imageToolbar = reactive({
|
|
|
// 显示隐藏 筛选表单
|
|
// 显示隐藏 筛选表单
|
|
|
const xGridTable = ref();
|
|
const xGridTable = ref();
|
|
|
const toggleFormEnabled = () => xGridTable.value.toggleFormEnabled();
|
|
const toggleFormEnabled = () => xGridTable.value.toggleFormEnabled();
|
|
|
|
|
+const getTableTotal = () => xGridTable.value.getTableData().tableData.length;
|
|
|
|
|
|
|
|
const refreshTable = () => {
|
|
const refreshTable = () => {
|
|
|
xGridTable.value.reloadColumn(columns);
|
|
xGridTable.value.reloadColumn(columns);
|
|
@@ -120,6 +127,12 @@ const refreshTable = () => {
|
|
|
|
|
|
|
|
const recordRef = ref();
|
|
const recordRef = ref();
|
|
|
const dialog = ref(false);
|
|
const dialog = ref(false);
|
|
|
|
|
+
|
|
|
|
|
+const table_add = () => {
|
|
|
|
|
+ dialog.value = true;
|
|
|
|
|
+ nextTick(() => recordRef.value?.open());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const table_edit = row => {
|
|
const table_edit = row => {
|
|
|
dialog.value = true;
|
|
dialog.value = true;
|
|
|
nextTick(() => recordRef.value?.setData(row));
|
|
nextTick(() => recordRef.value?.setData(row));
|
|
@@ -139,6 +152,8 @@ const table_del = ({ id }) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
- refreshTable
|
|
|
|
|
|
|
+ table_add,
|
|
|
|
|
+ refreshTable,
|
|
|
|
|
+ getTableTotal
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|