Commit d57d9124 authored by daniel's avatar daniel

feat(road): 轨迹排序功能处理

parent bd5d14a9
...@@ -138,9 +138,14 @@ $(document).ready(function () { ...@@ -138,9 +138,14 @@ $(document).ready(function () {
var pathId = parent.attr('data-path-id'); var pathId = parent.attr('data-path-id');
var pathName = parent.attr('data-path-name'); var pathName = parent.attr('data-path-name');
var sort = parent.attr('data-sort'); var sort = parent.attr('data-sort');
if (!sort) { if (pathId == -1) {
// 没有pathId属性,说明是新添加的路线,不能设置排序
return layer.msg('请先上传路线', { icon: 3, time: 1500 }); return layer.msg('请先上传路线', { icon: 3, time: 1500 });
} }
if (!sort) {
// 没有sort属性,说明是新添加的路线,sort默认100
sort = 100;
}
const index = layer.open({ const index = layer.open({
type: 1, type: 1,
title: '设置' + pathName + '排序', title: '设置' + pathName + '排序',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment