浏览代码

修改前端跳转

bihuisong 1 年之前
父节点
当前提交
54d48edbc5

+ 2 - 1
songhua-system/src/main/resources/mapper/system/CruiseShipMappingMapper.xml

@@ -26,9 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         c.ship_time
         FROM
         cruise_ship_mapping c
-        left join basic_cruise_ship b ON c.ship_id = b.id
+        left join basic_cruise_ship b ON c.did = b.registration_number
         <where>  
             <if test="shipId != null  and shipId != ''"> and ship_id = #{shipId}</if>
+            <if test="registrationNumber != null  and shipId != ''"> and registration_number = #{registrationNumber}</if>
             <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
             <if test="shipTime != null "> and ship_time = #{shipTime}</if>

+ 9 - 5
songhua-ui/src/views/ship/index.vue

@@ -107,11 +107,13 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
-      // 查询参数
+      // 查询参数.
+      registrationNumber : null,
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         shipId: null,
+
         longitude: null,
         latitude: null,
         shipTime: null
@@ -131,17 +133,19 @@ export default {
       }
     };
   },
+  mounted() {
+  },
   created() {
-    this.shipId = this.$route.query.id;
+    this.registrationNumber = this.$route.query.id;
     this.getList();
   },
   methods: {
     /** 查询列表 */
     getList() {
       this.loading = true;
-      const shipId = this.shipId;
-      this.queryParams.shipId = this.shipId
-      listMapping(this.addDateRange(this.queryParams, this.dateRange,shipId)).then(response => {
+      const registrationNumber = this.registrationNumber;
+      this.queryParams.registrationNumber = this.$route.query.id
+      listMapping(this.addDateRange(this.queryParams, this.dateRange,registrationNumber)).then(response => {
         this.mappingList = response.rows;
         this.total = response.total;
         this.loading = false;

+ 4 - 5
songhua-ui/src/views/system/ships/index.vue

@@ -186,12 +186,10 @@ export default {
       // 表单校验
       rules: {
         shipName: [
-          { required: true, message: "船名不能为空", trigger: "change" },
-          {validator: checkLon, trigger: 'blur'}
+          { required: true, message: "船名不能为空", trigger: "chablurnge" },
         ],
         registrationNumber: [
-          { required: true, message: "船舶注册号不能为空", trigger: "change" },
-          {validator: checkLat, trigger: 'blur'}
+          { required: true, message: "船舶注册号不能为空", trigger: "blur" },
         ],
       }
     };
@@ -235,7 +233,8 @@ export default {
       this.getList();
     },
     handleJump(row) {
-      this.$router.push({ path: 'shipMapping', query: { id: row.id } });
+      console.log("row",row)
+      this.$router.push({ path: 'shipMapping', query: { id: row.registrationNumber } });
     },
     /** 重置按钮操作 */
     resetQuery() {