Bladeren bron

feat: 面包屑导航支持缓存,切换的时候不再重置当前页内容

sunxiao 2 weken geleden
bovenliggende
commit
6ea4969210

+ 4 - 0
src/views/client/device/index.vue

@@ -4,6 +4,10 @@ import { ElMessageBox } from 'element-plus'
 import { getDeviceList, postDevice, putDevice, delDevice, getAllWaterFactoryList } from '@/api/client/manage'
 import { ref } from 'vue';
 
+defineOptions({
+  name: 'Decive'
+})
+
 const { proxy } = getCurrentInstance();
 
 const queryParams = ref({ 

+ 4 - 0
src/views/client/manage/index.vue

@@ -3,6 +3,10 @@ import { CirclePlus } from '@element-plus/icons-vue'
 import { ElMessageBox } from 'element-plus'
 import { getOrganizationList, postOrganization, putOrganization, delOrganization, getRegion } from '@/api/client/manage'
 
+defineOptions({
+  name: 'Manage'
+})
+
 const { proxy } = getCurrentInstance();
 
 const loading = ref(false);

+ 4 - 0
src/views/configuration/agentia/index.vue

@@ -2,6 +2,10 @@
 import { CirclePlus } from '@element-plus/icons-vue'
 import { getMedicineList, putMedicine, postMedicine, delMedicine } from '@/api/configuration'
 
+defineOptions({
+  name: 'Agentia'
+})
+
 const { proxy } = getCurrentInstance();
 
 const queryParams = ref({ 

+ 4 - 0
src/views/configuration/assay/index.vue

@@ -2,6 +2,10 @@
 import { CirclePlus } from '@element-plus/icons-vue'
 import { getAssayList, postAssay, delAssay, putAssay, getMedicineList } from '@/api/configuration'
 
+defineOptions({
+  name: 'Assay'
+})
+
 const { proxy } = getCurrentInstance();
 
 const queryParams = ref({ 

+ 4 - 0
src/views/configuration/design/index.vue

@@ -2,6 +2,10 @@
 import { CirclePlus, Edit, Search, Share, Upload } from '@element-plus/icons-vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 
+defineOptions({
+  name: 'Design'
+})
+
 const queryParams = ref({});
 const value = ref([])
 const formInline = ref({});

+ 3 - 0
src/views/configuration/flow/index.vue

@@ -4,6 +4,9 @@ import { ElMessageBox } from 'element-plus'
 import { getWorkFlowList, getPositionList, getAssayList, putWorkFlow, postWorkFlow, delWorkFlow } from '@/api/configuration'
 import { getAllDeviceList, getAllWaterFactoryList} from '@/api/client/manage'
 
+defineOptions({
+  name: 'Flow'
+})
 const { proxy } = getCurrentInstance();
 
 const queryParams = ref({

+ 3 - 0
src/views/configuration/point/index.vue

@@ -3,6 +3,9 @@ import { CirclePlus } from '@element-plus/icons-vue'
 import { getPositionList, postPosition, putPosition, delPosition } from '@/api/configuration'
 import { getAllDeviceList, getAllWaterFactoryList} from '@/api/client/manage'
 
+defineOptions({
+  name: 'Point'
+})
 
 const { proxy } = getCurrentInstance();
 

+ 4 - 0
src/views/configuration/sample/index.vue

@@ -3,6 +3,10 @@ import { CirclePlus } from '@element-plus/icons-vue'
 import { getSampleList, postSample, putSample, getAssayList, delSample } from '@/api/configuration'
 import { getAllWaterFactoryList} from '@/api/client/manage'
 
+defineOptions({
+  name: 'Sample'
+})
+
 const { proxy } = getCurrentInstance();
 
 const queryParams = ref({

+ 4 - 0
src/views/report/detection-month/index.vue

@@ -5,6 +5,10 @@ import { getContinuousAssayListNew, getDeviceList } from '@/api/report/lab';
 
 const { proxy } = getCurrentInstance();
 
+defineOptions({
+  name: 'DetectionMonth'
+})
+
 const queryParams = ref({
   pageNum: 1,
   pageSize: 10,

+ 4 - 0
src/views/report/laboratory-month/index.vue

@@ -3,6 +3,10 @@ import { dayjs } from 'element-plus';
 import { getMonthTable, getDeviceList } from '@/api/report/lab';
 import { computed } from 'vue';
 
+defineOptions({
+  name: 'LaboratoryMonth'
+})
+
 const { proxy } = getCurrentInstance();
 
 const queryParams = ref({

+ 6 - 0
src/views/report/record/index.vue

@@ -1,3 +1,9 @@
+<!-- 用于动态设置 name -->
+<script>
+export default {
+  name: location.hash.includes('assay-record') ? "AssayRecord" : "DetectionRecord"
+}
+</script>
 <script setup>
 import { getDeviceList, getDrawerData } from '@/api/report/lab';
 import { dayjs } from 'element-plus';

+ 4 - 0
src/views/report/report-daily/index.vue

@@ -3,6 +3,10 @@ import { RecordDrawer } from '@/views/report/components';
 import { getHomeCounts, getDailyTable, getDeviceList } from '@/api/report/lab';
 import { dayjs } from 'element-plus';
 
+defineOptions({
+  name: 'LaboratoryDaily'
+})
+
 const drawerVisible = ref(false);
 const tableLoading = ref(false);
 const total = ref(0);