中扬CRM客户关系管理系统
Junjie
2023-11-08 7f9d058a0e632be6a3daf6f46d26b69742db0720
src/main/webapp/static/js/plan/plan.js
@@ -246,7 +246,7 @@
        var tr = $(['<tr id="upload-">'
            ,'<td id="upload-filename-id-'+ file.lastModified + '">' + file.name +'</td>'
            ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>'
            ,'<td id="upload-file-id-' + file.lastModified + '">上传中</td>'
            ,'<td id="upload-file-id-' + file.lastModified + '">准备上传</td>'
            ,'<td>'
            ,'<button class="layui-btn layui-btn-xs demo-reload layui-hide">重传</button>'
            ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
@@ -272,14 +272,20 @@
            return false;
        }
        var index = layer.load(1, {
            shadeClose: false,
            title: '上传中..',
            shade: [0.5,'#000']
        });
        var file = _uploadFile
        $("#upload-file-id-" + file.lastModified).html("上传中")
        var filename = dateToStr2(new Date()) + "_" + file.name
        $("#upload-filename-id-" + file.lastModified).html(filename)
        putObject(file, filename).then((result) => {
        putObject(file).then((result) => {
            var filename = result.name
            layer.msg('上传成功', {icon: 1});
            $("#upload-file-id-" + file.lastModified).html("上传成功")
            $("#upload-filename-id-" + file.lastModified).html(filename)
            $.ajax({
                url: baseUrl+"/plan/insert/file/auth",
@@ -292,6 +298,7 @@
                method: 'POST',
                success: function (res) {
                    if (res.code === 200){
                        layer.close(index)
                        console.log(res)
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
@@ -649,7 +656,8 @@
        var downloadUrl = $(this).attr('href');
        let url = getObjectUrl(downloadUrl)
        layer.msg("准备下载中", {icon: 1});
        location.href = url
        // location.href = url
        window.open(url)
        return false;  // 阻止默认的链接跳转行为
    });