xiongchao 3 years ago
parent
commit
6797bb3ad8

+ 1223 - 0
public/hitch-screen/static/jquery.liMarquee.js

@@ -0,0 +1,1223 @@
+/*
+ * jQuery liMarquee v 4.6
+ *
+ * Copyright 2013, Linnik Yura | LI MASS CODE | http://masscode.ru
+ * http://masscode.ru/index.php/k2/item/44-limarquee
+ * Free to use
+ *
+ * Last Update 20.11.2014
+ */
+(function ($) {
+  var methods = {
+    init: function (options) {
+      var p = {
+        direction: 'left', // Указывает направление движения содержимого контейнера (left | right | up | down)
+        loop: -1, // Задает, сколько раз будет прокручиваться содержимое. "-1" для бесконечного воспроизведения движения
+        scrolldelay: 0, // Величина задержки в миллисекундах между движениями
+        scrollamount: 50, // Скорость движения контента (px/sec)
+        circular: true, // Если "true" - строка непрерывная
+        drag: true, // Если "true" - включено перетаскивание строки
+        runshort: true, // Если "true" - короткая строка тоже "бегает", "false" - стоит на месте
+        hoverstop: true, // true - строка останавливается при наведении курсора мыши, false - строка не останавливается
+        inverthover: false, // false - стандартное поведение. Если "true" - строка начинает движение только при наведении курсора
+        xml: false // Путь к xml файлу с нужным текстом
+      }
+      if (options) {
+        $.extend(p, options)
+      }
+
+      return this.each(function () {
+        var enterEvent = 'mouseenter'
+        var leaveEvent = 'mouseleave'
+        if (p.inverthover) {
+          enterEvent = 'mouseleave'
+          leaveEvent = 'mouseenter'
+        }
+
+        var
+          loop = p.loop
+        var strWrap = $(this).addClass('str_wrap').data({ scrollamount: p.scrollamount })
+        var fMove = false
+
+        var strWrapStyle = strWrap.attr('style')
+
+        if (strWrapStyle) {
+          var wrapStyleArr = strWrapStyle.split(';')
+          var startHeight = false
+          for (var i = 0; i < wrapStyleArr.length; i++) {
+            var str = $.trim(wrapStyleArr[i])
+            var tested = str.search(/^height/g)
+            if (tested != -1) {
+              startHeight = parseFloat(strWrap.css('height'))
+            }
+          }
+        }
+
+        var code = function () {
+          strWrap.off('mouseleave')
+          strWrap.off('mouseenter')
+          strWrap.off('mousemove')
+          strWrap.off('mousedown')
+          strWrap.off('mouseup')
+
+          if (!$('.str_move', strWrap).length) {
+            strWrap.wrapInner($('<div>').addClass('str_move'))
+          }
+
+          var
+            strMove = $('.str_move', strWrap).addClass('str_origin')
+          var strMoveClone = strMove.clone().removeClass('str_origin').addClass('str_move_clone')
+          var time = 0
+
+          if (!p.hoverstop) {
+            strWrap.addClass('noStop')
+          }
+
+          var circCloneHor = function () {
+            strMoveClone.clone().css({
+              left: '100%',
+              right: 'auto',
+              width: strMove.width()
+            }).appendTo(strMove)
+            strMoveClone.css({
+              right: '100%',
+              left: 'auto',
+              width: strMove.width()
+            }).appendTo(strMove)
+          }
+
+          var circCloneVert = function () {
+            strMoveClone.clone().css({
+              top: '100%',
+              bottom: 'auto',
+              height: strMove.height()
+            }).appendTo(strMove)
+            strMoveClone.css({
+              bottom: '100%',
+              top: 'auto',
+              height: strMove.height()
+            }).appendTo(strMove)
+          }
+
+          if (p.direction == 'left') {
+            strWrap.height(strMove.outerHeight())
+            if (strMove.width() > strWrap.width()) {
+              var leftPos = -strMove.width()
+
+              if (p.circular) {
+                if (!p.xml) {
+                  circCloneHor()
+                  leftPos = -(strMove.width() + (strMove.width() - strWrap.width()))
+                }
+              }
+              if (p.xml) {
+                strMove.css({
+                  left: strWrap.width()
+                })
+              }
+              var
+                strMoveLeft = strWrap.width()
+              var k1 = 0
+              var timeFunc1 = function () {
+                var
+                  fullS = Math.abs(leftPos)
+                var time = (fullS / strWrap.data('scrollamount')) * 1000
+                if (parseFloat(strMove.css('left')) != 0) {
+                  fullS = (fullS + strWrap.width())
+                  time = (fullS - (strWrap.width() - parseFloat(strMove.css('left')))) / strWrap.data('scrollamount') * 1000
+                }
+                return time
+              }
+              var moveFuncId1 = false
+              var moveFunc1 = function () {
+                if (loop != 0) {
+                  strMove.stop(true).animate({
+                    left: leftPos
+                  }, timeFunc1(), 'linear', function () {
+                    $(this).css({
+                      left: strWrap.width()
+                    })
+                    if (loop == -1) {
+                      moveFuncId1 = setTimeout(moveFunc1, p.scrolldelay)
+                    } else {
+                      loop--
+                      moveFuncId1 = setTimeout(moveFunc1, p.scrolldelay)
+                    }
+                  })
+                }
+              }
+              strWrap.data({
+                moveId: moveFuncId1,
+                moveF: moveFunc1
+              })
+              if (!p.inverthover) {
+                moveFunc1()
+              }
+
+              if (p.hoverstop) {
+                strWrap.on(enterEvent, function () {
+                  $(this).addClass('str_active')
+                  clearTimeout(moveFuncId1)
+                  strMove.stop(true)
+                }).on(leaveEvent, function () {
+                  $(this).removeClass('str_active')
+                  $(this).off('mousemove')
+                  moveFunc1()
+                })
+
+                if (p.drag) {
+                  strWrap.on('mousedown', function (e) {
+                    if (p.inverthover) {
+                      strMove.stop(true)
+                    }
+                    // drag
+                    var dragLeft
+                    var dir = 1
+                    var newX
+                    var oldX = e.clientX
+                    // drag
+
+                    strMoveLeft = strMove.position().left
+                    k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+
+                    $(this).on('mousemove', function (e) {
+                      fMove = true
+
+                      // drag
+                      newX = e.clientX
+                      if (newX > oldX) {
+                        dir = 1
+                      } else {
+                        dir = -1
+                      }
+                      oldX = newX
+                      dragLeft = k1 + (e.clientX - strWrap.offset().left)
+
+                      if (!p.circular) {
+                        if (dragLeft < -strMove.width() && dir < 0) {
+                          dragLeft = strWrap.width()
+                          strMoveLeft = strMove.position().left
+                          k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                        if (dragLeft > strWrap.width() && dir > 0) {
+                          dragLeft = -strMove.width()
+                          strMoveLeft = strMove.position().left
+                          k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                      } else {
+                        if (dragLeft < -strMove.width() && dir < 0) {
+                          dragLeft = 0
+                          strMoveLeft = strMove.position().left
+                          k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                        if (dragLeft > 0 && dir > 0) {
+                          dragLeft = -strMove.width()
+                          strMoveLeft = strMove.position().left
+                          k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                      }
+
+                      strMove.stop(true).css({
+                        left: dragLeft
+                      })
+                      // drag
+                    }).on('mouseup', function () {
+                      $(this).off('mousemove')
+                      if (p.inverthover) {
+                        strMove.trigger('mouseenter')
+                      }
+                      setTimeout(function () {
+                        fMove = false
+                      }, 50)
+                    })
+                    return false
+                  })
+                    .on('click', function () {
+                      if (fMove) {
+                        return false
+                      }
+                    })
+                } else {
+                  strWrap.addClass('no_drag')
+                };
+              }
+            } else {
+              if (p.runshort) {
+                strMove.css({
+                  left: strWrap.width()
+                })
+                var
+                  strMoveLeft = strWrap.width()
+                var k1 = 0
+                var timeFunc = function () {
+                  time = (strMove.width() + strMove.position().left) / strWrap.data('scrollamount') * 1000
+                  return time
+                }
+                var moveFunc = function () {
+                  var leftPos = -strMove.width()
+                  strMove.animate({
+                    left: leftPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      left: strWrap.width()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    }
+                  })
+                }
+                strWrap.data({
+                  moveF: moveFunc
+                })
+                if (!p.inverthover) {
+                  moveFunc()
+                }
+                if (p.hoverstop) {
+                  strWrap.on(enterEvent, function () {
+                    $(this).addClass('str_active')
+                    strMove.stop(true)
+                  }).on(leaveEvent, function () {
+                    $(this).removeClass('str_active')
+                    $(this).off('mousemove')
+                    moveFunc()
+                  })
+
+                  if (p.drag) {
+                    strWrap.on('mousedown', function (e) {
+                      if (p.inverthover) {
+                        strMove.stop(true)
+                      }
+
+                      // drag
+                      var dragLeft
+                      var dir = 1
+                      var newX
+                      var oldX = e.clientX
+                      // drag
+
+                      strMoveLeft = strMove.position().left
+                      k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                      $(this).on('mousemove', function (e) {
+                        fMove = true
+
+                        // drag
+                        newX = e.clientX
+                        if (newX > oldX) {
+                          dir = 1
+                        } else {
+                          dir = -1
+                        }
+                        oldX = newX
+                        dragLeft = k1 + (e.clientX - strWrap.offset().left)
+
+                        if (dragLeft < -strMove.width() && dir < 0) {
+                          dragLeft = strWrap.width()
+                          strMoveLeft = strMove.position().left
+                          k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                        if (dragLeft > strWrap.width() && dir > 0) {
+                          dragLeft = -strMove.width()
+                          strMoveLeft = strMove.position().left
+                          k1 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+
+                        strMove.stop(true).css({
+                          left: dragLeft
+                        })
+                      }).on('mouseup', function () {
+                        if (p.inverthover) {
+                          strMove.trigger('mouseenter')
+                        }
+                        $(this).off('mousemove')
+                        setTimeout(function () {
+                          fMove = false
+                        }, 50)
+                      })
+                      return false
+                    })
+                      .on('click', function () {
+                        if (fMove) {
+                          return false
+                        }
+                      })
+                  } else {
+                    strWrap.addClass('no_drag')
+                  };
+                }
+              } else {
+                strWrap.addClass('str_static')
+              }
+            };
+          };
+          if (p.direction == 'right') {
+            strWrap.height(strMove.outerHeight())
+            strWrap.addClass('str_right')
+            strMove.css({
+              left: -strMove.width(),
+              right: 'auto'
+            })
+
+            if (strMove.width() > strWrap.width()) {
+              var leftPos = strWrap.width()
+              strMove.css({
+                left: 0
+              })
+              if (p.circular) {
+                if (!p.xml) {
+                  circCloneHor()
+                  // Определяем крайнюю точку
+                  leftPos = strMove.width()
+                }
+              }
+
+              var
+                k2 = 0
+              timeFunc = function () {
+                var
+                  fullS = strWrap.width() // крайняя точка
+                var time = (fullS / strWrap.data('scrollamount')) * 1000 // время
+                if (parseFloat(strMove.css('left')) != 0) {
+                  fullS = (strMove.width() + strWrap.width())
+                  time = (fullS - (strMove.width() + parseFloat(strMove.css('left')))) / strWrap.data('scrollamount') * 1000
+                }
+                return time
+              }
+              var moveFunc = function () {
+                if (loop != 0) {
+                  strMove.animate({
+                    left: leftPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      left: -strMove.width()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    };
+                  })
+                };
+              }
+              strWrap.data({
+                moveF: moveFunc
+              })
+
+              if (!p.inverthover) {
+                moveFunc()
+              }
+              if (p.hoverstop) {
+                strWrap.on(enterEvent, function () {
+                  $(this).addClass('str_active')
+                  strMove.stop(true)
+                }).on(leaveEvent, function () {
+                  $(this).removeClass('str_active')
+                  $(this).off('mousemove')
+                  moveFunc()
+                })
+
+                if (p.drag) {
+                  strWrap.on('mousedown', function (e) {
+                    if (p.inverthover) {
+                      strMove.stop(true)
+                    }
+
+                    // drag
+                    var dragLeft
+                    var dir = 1
+                    var newX
+                    var oldX = e.clientX
+                    // drag
+
+                    strMoveLeft = strMove.position().left
+                    k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                    $(this).on('mousemove', function (e) {
+                      fMove = true
+
+                      // drag
+                      newX = e.clientX
+                      if (newX > oldX) {
+                        dir = 1
+                      } else {
+                        dir = -1
+                      }
+                      oldX = newX
+                      dragLeft = k2 + (e.clientX - strWrap.offset().left)
+
+                      if (!p.circular) {
+                        if (dragLeft < -strMove.width() && dir < 0) {
+                          dragLeft = strWrap.width()
+                          strMoveLeft = strMove.position().left
+                          k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                        if (dragLeft > strWrap.width() && dir > 0) {
+                          dragLeft = -strMove.width()
+                          strMoveLeft = strMove.position().left
+                          k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                      } else {
+                        if (dragLeft < -strMove.width() && dir < 0) {
+                          dragLeft = 0
+                          strMoveLeft = strMove.position().left
+                          k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                        if (dragLeft > 0 && dir > 0) {
+                          dragLeft = -strMove.width()
+                          strMoveLeft = strMove.position().left
+                          k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                      }
+
+                      strMove.stop(true).css({
+                        left: dragLeft
+                      })
+                    }).on('mouseup', function () {
+                      if (p.inverthover) {
+                        strMove.trigger('mouseenter')
+                      }
+                      $(this).off('mousemove')
+                      setTimeout(function () {
+                        fMove = false
+                      }, 50)
+                    })
+                    return false
+                  })
+                    .on('click', function () {
+                      if (fMove) {
+                        return false
+                      }
+                    })
+                } else {
+                  strWrap.addClass('no_drag')
+                };
+              }
+            } else {
+              if (p.runshort) {
+                var k2 = 0
+                var timeFunc = function () {
+                  time = (strWrap.width() - strMove.position().left) / strWrap.data('scrollamount') * 1000
+                  return time
+                }
+                var moveFunc = function () {
+                  var leftPos = strWrap.width()
+                  strMove.animate({
+                    left: leftPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      left: -strMove.width()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    };
+                  })
+                }
+
+                strWrap.data({
+                  moveF: moveFunc
+                })
+
+                if (!p.inverthover) {
+                  moveFunc()
+                }
+                if (p.hoverstop) {
+                  strWrap.on(enterEvent, function () {
+                    $(this).addClass('str_active')
+                    strMove.stop(true)
+                  }).on(leaveEvent, function () {
+                    $(this).removeClass('str_active')
+                    $(this).off('mousemove')
+                    moveFunc()
+                  })
+
+                  if (p.drag) {
+                    strWrap.on('mousedown', function (e) {
+                      if (p.inverthover) {
+                        strMove.stop(true)
+                      }
+
+                      // drag
+                      var dragLeft
+                      var dir = 1
+                      var newX
+                      var oldX = e.clientX
+                      // drag
+
+                      strMoveLeft = strMove.position().left
+                      k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                      $(this).on('mousemove', function (e) {
+                        fMove = true
+
+                        // drag
+                        newX = e.clientX
+                        if (newX > oldX) {
+                          dir = 1
+                        } else {
+                          dir = -1
+                        }
+                        oldX = newX
+                        dragLeft = k2 + (e.clientX - strWrap.offset().left)
+
+                        if (dragLeft < -strMove.width() && dir < 0) {
+                          dragLeft = strWrap.width()
+                          strMoveLeft = strMove.position().left
+                          k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+                        if (dragLeft > strWrap.width() && dir > 0) {
+                          dragLeft = -strMove.width()
+                          strMoveLeft = strMove.position().left
+                          k2 = strMoveLeft - (e.clientX - strWrap.offset().left)
+                        }
+
+                        strMove.stop(true).css({
+                          left: dragLeft
+                        })
+                      }).on('mouseup', function () {
+                        if (p.inverthover) {
+                          strMove.trigger('mouseenter')
+                        }
+                        $(this).off('mousemove')
+                        setTimeout(function () {
+                          fMove = false
+                        }, 50)
+                      })
+                      return false
+                    })
+                      .on('click', function () {
+                        if (fMove) {
+                          return false
+                        }
+                      })
+                  } else {
+                    strWrap.addClass('no_drag')
+                  };
+                }
+              } else {
+                strWrap.addClass('str_static')
+              }
+            };
+          };
+          if (p.direction == 'up') {
+            strWrap.addClass('str_vertical')
+
+            if (strMove.height() > strWrap.height()) {
+              var topPos = -strMove.height()
+              if (p.circular) {
+                if (!p.xml) {
+                  circCloneVert()
+                  topPos = -(strMove.height() + (strMove.height() - strWrap.height()))
+                }
+              }
+              if (p.xml) {
+                strMove.css({
+                  top: strWrap.height()
+                })
+              }
+              var
+                k2 = 0
+              timeFunc = function () {
+                var
+                  fullS = Math.abs(topPos)
+                var time = (fullS / strWrap.data('scrollamount')) * 1000
+                if (parseFloat(strMove.css('top')) != 0) {
+                  fullS = (fullS + strWrap.height())
+                  time = (fullS - (strWrap.height() - parseFloat(strMove.css('top')))) / strWrap.data('scrollamount') * 1000
+                }
+
+                return time
+              }
+              var moveFunc = function () {
+                if (loop != 0) {
+                  strMove.animate({
+                    top: topPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      top: strWrap.height()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    };
+                  })
+                };
+              }
+
+              strWrap.data({
+                moveF: moveFunc
+              })
+
+              if (!p.inverthover) {
+                moveFunc()
+              }
+              if (p.hoverstop) {
+                strWrap.on(enterEvent, function () {
+                  $(this).addClass('str_active')
+                  strMove.stop(true)
+                }).on(leaveEvent, function () {
+                  $(this).removeClass('str_active')
+                  $(this).off('mousemove')
+                  moveFunc()
+                })
+
+                if (p.drag) {
+                  strWrap.on('mousedown', function (e) {
+                    if (p.inverthover) {
+                      strMove.stop(true)
+                    }
+
+                    // drag
+                    var dragTop
+                    var dir = 1
+                    var newY
+                    var oldY = e.clientY
+                    // drag
+
+                    strMoveTop = strMove.position().top
+                    k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                    $(this).on('mousemove', function (e) {
+                      fMove = true
+
+                      // drag
+                      newY = e.clientY
+                      if (newY > oldY) {
+                        dir = 1
+                      } else {
+                        if (newY < oldY) {
+                          dir = -1
+                        }
+                      }
+                      oldY = newY
+                      dragTop = k2 + e.clientY - strWrap.offset().top
+
+                      if (!p.circular) {
+                        if (dragTop < -strMove.height() && dir < 0) {
+                          dragTop = strWrap.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        if (dragTop > strWrap.height() && dir > 0) {
+                          dragTop = -strMove.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                      } else {
+                        if (dragTop < -strMove.height() && dir < 0) {
+                          dragTop = 0
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        if (dragTop > 0 && dir > 0) {
+                          dragTop = -strMove.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                      }
+
+                      strMove.stop(true).css({
+                        top: dragTop
+                      })
+                      // drag
+                    }).on('mouseup', function () {
+                      if (p.inverthover) {
+                        strMove.trigger('mouseenter')
+                      }
+                      $(this).off('mousemove')
+                      setTimeout(function () {
+                        fMove = false
+                      }, 50)
+                    })
+                    return false
+                  })
+                    .on('click', function () {
+                      if (fMove) {
+                        return false
+                      }
+                    })
+                } else {
+                  strWrap.addClass('no_drag')
+                };
+              }
+            } else {
+              if (p.runshort) {
+                strMove.css({
+                  top: strWrap.height()
+                })
+                var k2 = 0
+                var timeFunc = function () {
+                  time = (strMove.height() + strMove.position().top) / strWrap.data('scrollamount') * 1000
+
+                  return time
+                }
+                var moveFunc = function () {
+                  var topPos = -strMove.height()
+                  strMove.animate({
+                    top: topPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      top: strWrap.height()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    };
+                  })
+                }
+                strWrap.data({
+                  moveF: moveFunc
+                })
+                if (!p.inverthover) {
+                  moveFunc()
+                }
+                if (p.hoverstop) {
+                  strWrap.on(enterEvent, function () {
+                    $(this).addClass('str_active')
+                    strMove.stop(true)
+                  }).on(leaveEvent, function () {
+                    $(this).removeClass('str_active')
+                    $(this).off('mousemove')
+                    moveFunc()
+                  })
+
+                  if (p.drag) {
+                    strWrap.on('mousedown', function (e) {
+                      if (p.inverthover) {
+                        strMove.stop(true)
+                      }
+
+                      // drag
+                      var dragTop
+                      var dir = 1
+                      var newY
+                      var oldY = e.clientY
+                      // drag
+
+                      strMoveTop = strMove.position().top
+                      k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                      $(this).on('mousemove', function (e) {
+                        fMove = true
+
+                        // drag
+                        newY = e.clientY
+                        if (newY > oldY) {
+                          dir = 1
+                        } else {
+                          if (newY < oldY) {
+                            dir = -1
+                          }
+                        }
+                        oldY = newY
+                        dragTop = k2 + e.clientY - strWrap.offset().top
+
+                        if (dragTop < -strMove.height() && dir < 0) {
+                          dragTop = strWrap.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        if (dragTop > strWrap.height() && dir > 0) {
+                          dragTop = -strMove.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        //* drag
+
+                        strMove.stop(true).css({
+                          top: dragTop
+                        })
+                      }).on('mouseup', function () {
+                        if (p.inverthover) {
+                          strMove.trigger('mouseenter')
+                        }
+                        $(this).off('mousemove')
+                        setTimeout(function () {
+                          fMove = false
+                        }, 50)
+                      })
+                      return false
+                    })
+                      .on('click', function () {
+                        if (fMove) {
+                          return false
+                        }
+                      })
+                  } else {
+                    strWrap.addClass('no_drag')
+                  };
+                }
+              } else {
+                strWrap.addClass('str_static')
+              }
+            };
+          };
+          if (p.direction == 'down') {
+            strWrap.addClass('str_vertical').addClass('str_down')
+            strMove.css({
+              top: -strMove.height(),
+              bottom: 'auto'
+            })
+            if (strMove.height() > strWrap.height()) {
+              var topPos = strWrap.height()
+              if (p.circular) {
+                if (!p.xml) {
+                  circCloneVert()
+                  topPos = strMove.height()
+                }
+              }
+              if (p.xml) {
+                strMove.css({
+                  top: -strMove.height()
+                })
+              }
+              var
+                k2 = 0
+              timeFunc = function () {
+                var
+                  fullS = strWrap.height() // крайняя точка
+                var time = (fullS / strWrap.data('scrollamount')) * 1000 // время
+
+                if (parseFloat(strMove.css('top')) != 0) {
+                  fullS = (strMove.height() + strWrap.height())
+                  time = (fullS - (strMove.height() + parseFloat(strMove.css('top')))) / strWrap.data('scrollamount') * 1000
+                }
+                return time
+              }
+              var moveFunc = function () {
+                if (loop != 0) {
+                  strMove.animate({
+                    top: topPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      top: -strMove.height()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    };
+                  })
+                };
+              }
+              strWrap.data({
+                moveF: moveFunc
+              })
+              if (!p.inverthover) {
+                moveFunc()
+              }
+              if (p.hoverstop) {
+                strWrap.on(enterEvent, function () {
+                  $(this).addClass('str_active')
+                  strMove.stop(true)
+                }).on(leaveEvent, function () {
+                  $(this).removeClass('str_active')
+                  $(this).off('mousemove')
+                  moveFunc()
+                })
+
+                if (p.drag) {
+                  strWrap.on('mousedown', function (e) {
+                    if (p.inverthover) {
+                      strMove.stop(true)
+                    }
+
+                    // drag
+                    var dragTop
+                    var dir = 1
+                    var newY
+                    var oldY = e.clientY
+                    // drag
+
+                    strMoveTop = strMove.position().top
+                    k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                    $(this).on('mousemove', function (e) {
+                      fMove = true
+
+                      // drag
+                      newY = e.clientY
+                      if (newY > oldY) {
+                        dir = 1
+                      } else {
+                        if (newY < oldY) {
+                          dir = -1
+                        }
+                      }
+                      oldY = newY
+                      dragTop = k2 + e.clientY - strWrap.offset().top
+
+                      if (!p.circular) {
+                        if (dragTop < -strMove.height() && dir < 0) {
+                          dragTop = strWrap.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        if (dragTop > strWrap.height() && dir > 0) {
+                          dragTop = -strMove.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                      } else {
+                        if (dragTop < -strMove.height() && dir < 0) {
+                          dragTop = 0
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        if (dragTop > 0 && dir > 0) {
+                          dragTop = -strMove.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                      }
+
+                      strMove.stop(true).css({
+                        top: dragTop
+                      })
+                      // drag
+                    }).on('mouseup', function () {
+                      if (p.inverthover) {
+                        strMove.trigger('mouseenter')
+                      }
+                      $(this).off('mousemove')
+                      setTimeout(function () {
+                        fMove = false
+                      }, 50)
+                    })
+                    return false
+                  })
+                    .on('click', function () {
+                      if (fMove) {
+                        return false
+                      }
+                    })
+                } else {
+                  strWrap.addClass('no_drag')
+                };
+              }
+            } else {
+              if (p.runshort) {
+                var k2 = 0
+                var timeFunc = function () {
+                  time = (strWrap.height() - strMove.position().top) / strWrap.data('scrollamount') * 1000
+                  return time
+                }
+                var moveFunc = function () {
+                  var topPos = strWrap.height()
+                  strMove.animate({
+                    top: topPos
+                  }, timeFunc(), 'linear', function () {
+                    $(this).css({
+                      top: -strMove.height()
+                    })
+                    if (loop == -1) {
+                      setTimeout(moveFunc, p.scrolldelay)
+                    } else {
+                      loop--
+                      setTimeout(moveFunc, p.scrolldelay)
+                    };
+                  })
+                }
+                strWrap.data({
+                  moveF: moveFunc
+                })
+                if (!p.inverthover) {
+                  moveFunc()
+                }
+                if (p.hoverstop) {
+                  strWrap.on(enterEvent, function () {
+                    $(this).addClass('str_active')
+                    strMove.stop(true)
+                  }).on(leaveEvent, function () {
+                    $(this).removeClass('str_active')
+                    $(this).off('mousemove')
+                    moveFunc()
+                  })
+
+                  if (p.drag) {
+                    strWrap.on('mousedown', function (e) {
+                      if (p.inverthover) {
+                        strMove.stop(true)
+                      }
+
+                      // drag
+                      var dragTop
+                      var dir = 1
+                      var newY
+                      var oldY = e.clientY
+                      // drag
+
+                      strMoveTop = strMove.position().top
+                      k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                      $(this).on('mousemove', function (e) {
+                        fMove = true
+
+                        // drag
+                        newY = e.clientY
+                        if (newY > oldY) {
+                          dir = 1
+                        } else {
+                          if (newY < oldY) {
+                            dir = -1
+                          }
+                        }
+                        oldY = newY
+                        dragTop = k2 + e.clientY - strWrap.offset().top
+
+                        if (dragTop < -strMove.height() && dir < 0) {
+                          dragTop = strWrap.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        if (dragTop > strWrap.height() && dir > 0) {
+                          dragTop = -strMove.height()
+                          strMoveTop = strMove.position().top
+                          k2 = strMoveTop - (e.clientY - strWrap.offset().top)
+                        }
+                        //* drag
+
+                        strMove.stop(true).css({
+                          top: dragTop
+                        })
+                      }).on('mouseup', function () {
+                        if (p.inverthover) {
+                          strMove.trigger('mouseenter')
+                        }
+                        $(this).off('mousemove')
+                        setTimeout(function () {
+                          fMove = false
+                        }, 50)
+                      })
+                      return false
+                    })
+                      .on('click', function () {
+                        if (fMove) {
+                          return false
+                        }
+                      })
+                  } else {
+                    strWrap.addClass('no_drag')
+                  };
+                }
+              } else {
+                strWrap.addClass('str_static')
+              }
+            };
+          };
+        }
+        if (p.xml) {
+          $.ajax({
+            url: p.xml,
+            dataType: 'xml',
+            success: function (xml) {
+              var xmlTextEl = $(xml).find('text')
+              var xmlTextLength = xmlTextEl.length
+              for (var i = 0; i < xmlTextLength; i++) {
+                var xmlElActive = xmlTextEl.eq(i)
+                var xmlElContent = xmlElActive.text()
+                var xmlItemEl = $('<span>').text(xmlElContent).appendTo(strWrap)
+
+                if (p.direction == 'left' || p.direction == 'right') {
+                  xmlItemEl.css({ display: 'inline-block', textAlign: 'right' })
+                  if (i > 0) {
+                    xmlItemEl.css({ width: strWrap.width() + xmlItemEl.width() })
+                  }
+                }
+                if (p.direction == 'down' || p.direction == 'up') {
+                  xmlItemEl.css({ display: 'block', textAlign: 'left' })
+                  if (i > 0) {
+                    xmlItemEl.css({ paddingTop: strWrap.height() })
+                  }
+                }
+              }
+              code()
+            }
+          })
+        } else {
+          code()
+        }
+        strWrap.data({
+          ini: code,
+          startheight: startHeight
+        })
+      })
+    },
+    update: function () {
+      var el = $(this)
+      var str_origin = $('.str_origin', el)
+      var str_move_clone = $('.str_move_clone', el)
+      str_origin.stop(true)
+      str_move_clone.remove()
+      el.data('ini')()
+    },
+    destroy: function () {
+      var el = $(this)
+      var elMove = $('.str_move', el)
+      var startHeight = el.data('startheight')
+
+      $('.str_move_clone', el).remove()
+      el.off('mouseenter')
+      el.off('mousedown')
+      el.off('mouseup')
+      el.off('mouseleave')
+      el.off('mousemove')
+      el.removeClass('noStop').removeClass('str_vertical').removeClass('str_active').removeClass('no_drag').removeClass('str_static').removeClass('str_right').removeClass('str_down')
+
+      var elStyle = el.attr('style')
+      if (elStyle) {
+        var styleArr = elStyle.split(';')
+        for (var i = 0; i < styleArr.length; i++) {
+          var str = $.trim(styleArr[i])
+          var tested = str.search(/^height/g)
+          if (tested != -1) {
+            styleArr[i] = ''
+          }
+        }
+        var newArr = styleArr.join(';')
+        var newStyle = newArr.replace(/;+/g, ';')
+
+        if (newStyle == ';') {
+          el.removeAttr('style')
+        } else {
+          el.attr('style', newStyle)
+        }
+
+        if (startHeight) {
+          el.css({ height: startHeight })
+        }
+      }
+      elMove.stop(true)
+
+      if (elMove.length) {
+        var context = elMove.html()
+        elMove.remove()
+        el.html(context)
+      }
+    },
+    pause: function () {
+      var el = $(this)
+      var elMove = $('.str_move', el)
+      elMove.stop(true)
+    },
+    play: function () {
+      var el = $(this)
+      $(this).off('mousemove')
+      el.data('moveF')()
+    }
+
+  }
+  $.fn.liMarquee = function (method) {
+    if (methods[method]) {
+      return methods[method].apply(this, Array.prototype.slice.call(arguments, 1))
+    } else if (typeof method === 'object' || !method) {
+      return methods.init.apply(this, arguments)
+    } else {
+      $.error('Метод ' + method + ' в jQuery.liMarquee не существует')
+    }
+  }
+})(jQuery)

+ 102 - 0
public/test/test-screen.html

@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!-- saved from url=(0065)http://49.235.183.102:7003/EAM/boardandreport.do?screenboardequip -->
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title>设备看板</title>
+<script type="text/javascript" src="./设备看板_files/jquery-1.8.0.min.js.下载"></script>
+<script type="text/javascript" src="./设备看板_files/boardtime.js.下载"></script>
+<script type="text/javascript" src="./设备看板_files/swiper.min.js.下载"></script>
+<script type="text/javascript" src="./设备看板_files/jquery.cookie.js.下载"></script>
+<link type="text/css" rel="stylesheet" href="./设备看板_files/rebordindex.css">
+<link type="text/css" rel="stylesheet" href="./设备看板_files/swiper.min.css">
+</head>
+<body onload="time()">
+<img class="kanban-title" src="./设备看板_files/sbtitle.png">
+<!-- <div class="kanban-top">
+	<div class="kanban-top-border"></div>
+	<div class="kanban-top-main" id="time"></div>
+</div> -->
+<div class="kanban-main">
+	<div class="kanban-main-content">
+		<div class="kanban-main-top">
+			<ul>
+				<li>
+					<img src="./设备看板_files/img6.png">
+					<div class="num v1"></div>
+					<div class="text ">样品信息</div>
+				</li>
+				<li>
+					<img src="./设备看板_files/img3.png">
+					<div class="num v2"></div>
+					<div class="text ">检测编号</div>
+				</li>
+				<li>
+					<img src="./设备看板_files/img2.png">
+					<div class="num v3"></div>
+					<div class="text">车间</div>
+				</li>
+				<li>
+					<img src="./设备看板_files/img4.png">
+					<div class="num"  style="font-size: 14px">合格</div>
+					<div class="text">其他参数</div>
+				</li>
+				<li>
+					<img src="./设备看板_files/img7.png">
+					<div class="num v4"></div>
+					<div class="text">水分/ppm</div>
+				</li>
+				<li>
+					<img src="./设备看板_files/img5.png">
+					<div class="num v5"></div>
+					<div class="text">固含量</div>
+				</li>
+			</ul>
+		</div>
+		<div class="kanban-main-bottom" style="margin-top: 20px">
+			<img class="img10" src="./设备看板_files/img10.png">
+			<img class="img11" src="./设备看板_files/img11.png">
+			<img class="img8" src="./设备看板_files/img8.png">
+			<img class="img9" src="./设备看板_files/img9.png">
+			<div class="weixiucol-title">
+				<img src="./设备看板_files/title-img.png">设备列表
+			</div>
+			<div class="col-title">
+				<div class="col-15">样品信息</div>
+				<div class="col-15">检测编号</div>
+        <div class="col-15">检测车间</div>
+				<div class="col-11">水分/ppm</div>
+				<div class="col-11">固含量</div>
+        <div class="" style="width: 15%">送样时间</div>
+				<div class="" style="width: 15%">检测时间</div>
+			</div>
+      <div class="col-title">
+        <div class="col-15" id="v1"></div>
+        <div class="col-15" id="v2"></div>
+        <div class="col-15" id="v3"></div>
+        <div class="col-11" id="v4"></div>
+        <div class="col-11" id="v5"></div>
+        <div class="" style="width: 15%"  id="v6"></div>
+        <div class="" style="width: 15%" id="v7"></div>
+      </div>
+			<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
+    </div>
+	</div>
+</div>
+<!--<script type="text/javascript" src="./设备看板_files/repairboard.js.下载"></script>-->
+<script src="./设备看板_files/fullscreen.js.下载"></script>
+<script>
+  setInterval(function(){getData()}, 2000);
+  function getData(){
+    var data = JSON.parse(localStorage.getItem('test'))
+    console.log(data)
+    $('.v1, #v1').text(data.param1);
+    $('.v2, #v2').text(data.param2);
+    $('.v3, #v3').text(data.param3)
+    $('.v4, #v4').text(data.param4);
+    $('.v5, #v5').text(data.param5);
+    $('#v6').text(data.param6);
+    $('#v7').text(data.param7);
+  }
+
+</script>
+</body></html>

+ 39 - 0
public/test/设备看板_files/boardtime.js.下载

@@ -0,0 +1,39 @@
+//获取动态时间    
+var t = null;
+t = setTimeout(time,1000);// 开始执行
+function time()
+    {
+       clearTimeout(t);// 清除定时器
+       dt = new Date();
+       var y=dt.getYear()+1900;
+       var mm=dt.getMonth()+1;
+       var d=dt.getDate();
+       var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
+       	var day=dt.getDay();
+       	var h=dt.getHours();
+       	var m=dt.getMinutes();
+       	var s=dt.getSeconds();
+       	if(h<10){h="0"+h;}
+       	if(m<10){m="0"+m;}
+       	if(s<10){s="0"+s;}
+        $("#time").html( y+"年"+mm+"月"+d+"日&nbsp;"+weekday[day]+"&nbsp;"+h+":"+m+":"+s+"");
+       	t = setTimeout(time,1000); // 设定定时器,循环执行
+    }
+
+
+/** 
+* 
+* @param hex 例如:"#23ff45" 
+* @param opacity 透明度 
+* @returns {string} 
+*/ 
+function hexToRgba(hex, opacity) { 
+return "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," + parseInt("0x" + hex.slice(5, 7)) + "," + opacity + ")"; 
+}
+
+function test()
+{
+	var hex1='#2c69a8';
+	var opt1='0.5';
+	var result=hexToRgba(hex1,opt1);
+}

+ 45 - 0
public/test/设备看板_files/fullscreen.js.下载

@@ -0,0 +1,45 @@
+
+
+var FullScreenManager = (function(){
+	function on(){
+		console.log("----全屏----");
+		var el = document.documentElement;
+		var rfs = el.requestFullScreen || el.webkitRequestFullScreen ||
+		    el.mozRequestFullScreen || el.msRequestFullScreen;
+		if (rfs) { //typeof rfs != "undefined" && rfs
+		    rfs.call(el);
+		} else if (typeof window.ActiveXObject != "undefined") {
+		    //for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏
+		    var wscript = new ActiveXObject("WScript.Shell");
+		    if (wscript != null) {
+		        wscript.SendKeys("{F11}");
+		    }
+		}
+	}
+	function off(){
+	    var el = document;
+	    var cfs = el.cancelFullScreen || el.webkitCancelFullScreen ||
+	        el.mozCancelFullScreen || el.exitFullScreen;
+	    if (cfs) { //typeof cfs != "undefined" && cfs
+	        cfs.call(el);
+	    } else if (typeof window.ActiveXObject != "undefined") {
+	        //for IE,这里和fullScreen相同,模拟按下F11键退出全屏
+	        var wscript = new ActiveXObject("WScript.Shell");
+	        if (wscript != null) {
+	            wscript.SendKeys("{F11}");
+	        }
+	    }
+	}
+	
+	
+	function click(){
+		$(window).unbind();
+		//全屏事件需要手动触发,由于浏览器的安全
+		$("body").one('click',function(){
+			on();
+		});
+		$("body").trigger("click");
+	}
+	
+	return {on: on, off: off,click:click};
+})();

BIN
public/test/设备看板_files/img10.png


BIN
public/test/设备看板_files/img11.png


BIN
public/test/设备看板_files/img2.png


BIN
public/test/设备看板_files/img3.png


BIN
public/test/设备看板_files/img4.png


BIN
public/test/设备看板_files/img5.png


BIN
public/test/设备看板_files/img6.png


BIN
public/test/设备看板_files/img7.png


BIN
public/test/设备看板_files/img8.png


BIN
public/test/设备看板_files/img9.png


File diff suppressed because it is too large
+ 1 - 0
public/test/设备看板_files/jquery-1.8.0.min.js.下载


+ 72 - 0
public/test/设备看板_files/jquery.cookie.js.下载

@@ -0,0 +1,72 @@
+/*!
+ * jQuery Cookie Plugin v1.3
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2011, Klaus Hartl
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.opensource.org/licenses/GPL-2.0
+ */
+(function ($, document, undefined) {
+
+	var pluses = /\+/g;
+
+	function raw(s) {
+		return s;
+	}
+
+	function decoded(s) {
+		return decodeURIComponent(s.replace(pluses, ' '));
+	}
+
+	var config = $.cookie = function (key, value, options) {
+
+		// write
+		if (value !== undefined) {
+			options = $.extend({}, config.defaults, options);
+
+			if (value === null) {
+				options.expires = -1;
+			}
+
+			if (typeof options.expires === 'number') {
+				var days = options.expires, t = options.expires = new Date();
+				t.setDate(t.getDate() + days);
+			}
+
+			value = config.json ? JSON.stringify(value) : String(value);
+
+			return (document.cookie = [
+				encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
+				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+				options.path    ? '; path=' + options.path : '',
+				options.domain  ? '; domain=' + options.domain : '',
+				options.secure  ? '; secure' : ''
+			].join(''));
+		}
+
+		// read
+		var decode = config.raw ? raw : decoded;
+		var cookies = document.cookie.split('; ');
+		for (var i = 0, l = cookies.length; i < l; i++) {
+			var parts = cookies[i].split('=');
+			if (decode(parts.shift()) === key) {
+				var cookie = decode(parts.join('='));
+				return config.json ? JSON.parse(cookie) : cookie;
+			}
+		}
+
+		return null;
+	};
+
+	config.defaults = {};
+
+	$.removeCookie = function (key, options) {
+		if ($.cookie(key) !== null) {
+			$.cookie(key, null, options);
+			return true;
+		}
+		return false;
+	};
+
+})(jQuery, document);

+ 221 - 0
public/test/设备看板_files/rebordindex.css

@@ -0,0 +1,221 @@
+*{
+	margin:0px;
+	padding:0px;
+	box-sizing:border-box;
+}
+html,body{
+	height:100%;
+}
+body{
+	background:#0a0f25;
+	padding:20px;
+}
+.kanban-title{
+	position:fixed;
+	top:-4px;
+	left:50%;
+	margin-left:-266px;
+	z-index:999;
+}
+.kanban-top{
+	position:fixed;
+	top:0px;
+	left:0px;
+	width:100%;
+	height:120px;
+	padding:0px 20px;
+	background:#0a0f25;
+}
+.kanban-top-border{
+	border-top: 1px solid #255269;
+    margin: 54px 0px 8px;
+}
+.kanban-top-main{
+	background: #141c41;
+    height: 48px;
+    color: #fff;
+    font-size: 20px;
+    line-height: 48px;
+    text-align: right;
+    padding-right: 20px;
+}
+.kanban-main{
+	width:100%;
+	height:100%;
+	padding-top:100px;
+}
+.kanban-main-content{
+	width:100%;
+	height:100%;
+	background:url(webpage/com/jeecg/boardreport/plugin/img/back.png) no-repeat;
+	padding:10px 20px 30px;
+	background-size: cover;
+}
+.kanban-main-top{
+	width:100%;
+	height:45%;
+	margin-bottom:15px;
+}
+.kanban-main-bottom{
+	position:relative;
+	width:100%;
+	height:70%;
+	background: #141c41;
+    box-shadow: 0px 0px 19px #2c41b3 inset;
+    padding:20px;
+}
+.kanban-main-bottom>img{
+	position:absolute;
+}
+.kanban-main-bottom>.img8{
+	top:-8px;
+	left:-8px;
+}
+.kanban-main-bottom>.img9{
+	top:-8px;
+	right:-8px;
+}
+.kanban-main-bottom>.img10{
+	bottom:-8px;
+	left:-8px;
+}
+.kanban-main-bottom>.img11{
+	bottom:-8px;
+	right:-8px;
+}
+.weixiucol-title{
+	color: #02e7f8;
+    border-bottom: 1px solid #4c59b2;
+    font-size: 20px;
+    padding-bottom: 10px;
+    margin-bottom:10px;
+}
+.weixiucol-title>img{
+	vertical-align:middle;
+	margin-right:10px;
+}
+.col-title{
+    background: #222957;
+    overflow:hidden;
+    height:42px;
+    line-height:42px;
+}
+.col-title div{
+	color: #2bc9ff;
+    float: left;
+    text-align: center;
+    font-size: 16px;
+}
+.swiper-wrapper .col-main:nth-child(even){
+	 background: #222957;
+}
+.col-main{
+
+    overflow:hidden;
+    height:42px;
+    line-height:42px;
+}
+.col-main div{
+	color: #2bc9ff;
+    float: left;
+    text-align: center;
+    font-size: 18px;
+}
+.col-15{
+	width:15%;
+}
+.col-11{
+	width:11%;
+}
+.swiper-container{
+	overflow:hidden;
+}
+.swiper-pagination.swiper-pagination-custom{
+	color:#2BFFB2;
+	font-size:20px;
+	padding: 12px;
+    text-align: right;
+    position: initial;
+}
+.kanban-main-top{
+	padding:0px 2%;
+}
+.kanban-main-top>ul{
+	overflow:hidden;
+	height:100%;
+}
+.kanban-main-top>ul li{
+	height:100%;
+	width:16.66%;
+	float:left;
+	text-align:center;
+	list-style:none;
+	position:relative;
+}
+.kanban-main-top>ul li img{
+	height:80%;
+	animation:myfirst 1s;
+
+}
+@keyframes myfirst
+{
+from {
+    transform: rotate(0deg);
+    }
+to {transform: rotate(360deg);}
+}
+.kanban-main-top>ul li .num{
+	font-size: 30px;
+    position: absolute;
+    top: 40%;
+    /* left: 50%; */
+    width: 100%;
+    text-align: center;
+    margin-top: -23px;
+}
+.kanban-main-top>ul li .text{
+	padding-top:8px;
+	font-size:20px;
+}
+.kanban-main-top>ul li:nth-child(1){
+	color:#1DEFE3;
+}
+.kanban-main-top>ul li:nth-child(2){
+	color:#C52CFF;
+}
+.kanban-main-top>ul li:nth-child(3){
+	color:#DCC523;
+}
+.kanban-main-top>ul li:nth-child(4){
+	color:#e84669;
+}
+.kanban-main-top>ul li:nth-child(5){
+	color:#2BFFB2;
+}
+.kanban-main-top>ul li:nth-child(6){
+	color:#7DDE1E;
+}
+.ic-34FFFF{
+	color:#34FFFF;
+}
+.ic-FFED34{
+	color:#FFED34;
+}
+.ic-FF0323{
+	color:#FF0323;
+}
+.color-D12BFF{
+	color:#D12BFF;
+}
+.color-438CE8{
+	color:#438CE8;
+}
+.color-E7CF22{
+	color:#E7CF22;
+}
+.color-FF4575{
+	color:#FF4575;
+}
+.color-85F018{
+	color:#85F018;
+}

File diff suppressed because it is too large
+ 11 - 0
public/test/设备看板_files/repairboard.js.下载


BIN
public/test/设备看板_files/sbtitle.png


File diff suppressed because it is too large
+ 11 - 0
public/test/设备看板_files/swiper.min.css


File diff suppressed because it is too large
+ 11 - 0
public/test/设备看板_files/swiper.min.js.下载


BIN
public/test/设备看板_files/title-img.png


+ 13 - 1
src/router/generator-platform-routers.js

@@ -374,7 +374,19 @@ export const constantRouterMap = [
       }
     ]
   },
-
+  {
+    path: '/demo',
+    component: BlankLayout,
+    redirect: '/demo/test',
+    hidden: true,
+    children: [
+      {
+        path: 'test',
+        name: 'test',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/test/BaseFormBak')
+      }
+    ]
+  },
   {
     path: '/screen',
     component: BlankLayout,

+ 673 - 0
src/views/sb/type/BaseForm.vue

@@ -0,0 +1,673 @@
+<template>
+  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+    <a-row :gutter="48" slot="extra">
+      <a-col :md="48" :sm="48">
+        <span class="table-page-search-submitButtons" style="float: right">
+          <a-button type="primary" @click="save()">提交</a-button>
+          <a-button style="margin-left: 8px" @click="handleFresh()">刷新位置</a-button>
+          <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+        </span>
+      </a-col>
+    </a-row>
+
+    <title-divider title="基本信息" width="90px"></title-divider>
+    <a-form :form="form">
+      <a-form-item v-show="false" >
+        <a-input v-decorator="['id']" type="hidden"/>
+        <a-input v-decorator="['parentId']" type="hidden"/>
+      </a-form-item>
+
+      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="设备(新号)"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['no', {rules: [{required: true, message: '不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="设备(旧号)"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['zbh', {rules: [{required: false, message: '不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="设备名称"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['name', {rules: [{required: true, message: '设备名称不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="型号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['model', {rules: [{required: true, message: '设备型号不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="是否固定资产"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['isFinancing', { rules: [{required: true, message: '是否显示不能为空'}]}]" placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in isFinancingMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-card>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import { addSbInfo, updateSbInfo, fetchSbInfo, copySbInfo } from '@/api/sb/info'
+import { fetchSbTypeTree } from '@/api/sb/type'
+import FirmProducerSelectModal from '@/views/firm/producer/modules/FirmProducerSelectModal'
+import SbGuigeSelectModal from '@/views/sb/guige/modules/SbGuigeSelectModal'
+import SbModelSelectModal from '@/views/sb/model/modules/SbModelSelectModal'
+import BaseTool from '../../../../utils/tool'
+import { queryUserDeptByUserDeptId } from '@/api/upms/user-dept'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import Vue from 'vue'
+import { uploadUrl } from '@/api/upms/file'
+import { queryDept, getDeptsAllByParentId } from '@/api/upms/dept'
+import { queryUser } from '@/api/upms/user'
+import DetailList from '@/components/tools/DetailList'
+import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
+import ParamForm from './ParamForm'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'BaseSbInfo',
+  components: {
+    FirmProducerSelectModal,
+    SbGuigeSelectModal,
+    SbModelSelectModal,
+    SbInfoSelectModal,
+    ParamForm,
+    DetailList,
+    DetailListItem
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      areaList: {},
+      companyList: {},
+      paramList: [],
+      projectList: {},
+      deptList: {},
+      groupList: {},
+      visible: false,
+      sbTypeTreeData: [],
+      // sbInfoTreeData: [],
+      // sourceSbInfoTreeData: [],
+      // sbPositionTreeData: [],
+      depreciationTypeMap: {},
+      sourceTypeMap: {},
+      levelMap: {},
+      rlTypeMap: {},
+      colorMap: {},
+      useTypeMap: {},
+      statusMap: {},
+      isChildMap: {},
+      isShowMap: {},
+      isFinancingMap: {},
+      userList: {},
+      unitMap: {},
+      sbInfoSelectType: null,
+      repairFileList: [], // 维修手册
+      defaultRepairFileList: [],
+      defaultUseFileList: [],
+      defaultRecheckFileList: [],
+      defaultSbFileList: [],
+      useFileList: [], // 使用手册
+      recheckFileList: [], // 验收手册
+      sbFileList: [], // 设备图片,
+      uploadUrl: uploadUrl,
+      qrcodesrc: null,
+      id: null,
+      fileList: [],
+      type: null,
+      headers: {
+        Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
+      }
+    }
+  },
+  props: {
+    useType: {
+      type: Number,
+      default: 3
+    }
+  },
+  created () {
+    this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
+    this.colorMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_COLOR)
+    this.rlTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.RANLIAO_TYPE)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
+    this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
+    this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
+    this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
+    this.isChildMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_CHILD)
+    this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
+    this.isFinancingMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_FINANCING)
+  },
+  methods: {
+    base (record, type) {
+      this.setTree(record)
+      // 清除文件列表
+      this.visible = true
+      // 选择框查询条件
+      // 如果是空标识添加
+      if (this.BaseTool.Object.isBlank(record)) {
+        this.qrcodesrc = null
+        this.modalTitle = '添加'
+        this.clearFileList()
+        return
+      }
+      this.useType = record.useType
+      this.modalTitle = '编辑'
+      this.id = record.id
+      this.qrcodesrc = record.qrCode
+      this.repairFileList = record.repairFileList
+      this.useFileList = record.useFileList
+      this.recheckFileList = record.recheckFileList
+      this.sbFileList = record.sbFileList
+      this.defaultRepairFileList = this.BaseTool.UPLOAD.transImg(this.repairFileList)
+      this.defaultUseFileList = this.BaseTool.UPLOAD.transImg(this.useFileList)
+      this.defaultRecheckFileList = this.BaseTool.UPLOAD.transImg(this.recheckFileList)
+      this.defaultSbFileList = this.BaseTool.UPLOAD.transImg(this.sbFileList)
+      this.paramList = JSON.parse(record.paramList)
+      if (type === 1) {
+        this.type = type
+        this.modalTitle = '复制'
+        this.qrcodesrc = null
+        record.no = null
+        this.clearFileList()
+      }
+
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      // record.buyDate = this.BaseTool.Moment(record.buyDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.startDate = this.BaseTool.Moment(record.startDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.nextCheckDate = this.BaseTool.Moment(record.nextCheckDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.guaranteeDate = this.BaseTool.Moment(record.guaranteeDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.retirementDate = this.BaseTool.Moment(record.retirementDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+
+      // record.lastRepaireTime = this.BaseTool.Moment(record.lastRepaireTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.lastBaoyangTime = this.BaseTool.Moment(record.lastBaoyangTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (record.buyDate != null) {
+        record.buyDate = this.BaseTool.Moment(record.buyDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'buyDate'
+          ])))
+        })
+      }
+      if (record.startDate != null) {
+        record.startDate = this.BaseTool.Moment(record.startDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'startDate'
+          ])))
+        })
+      }
+      if (record.checkDate != null) {
+        record.checkDate = this.BaseTool.Moment(record.checkDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'checkDate'
+          ])))
+        })
+      }
+      if (record.nextCheckDate != null) {
+        record.nextCheckDate = this.BaseTool.Moment(record.nextCheckDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'nextCheckDate'
+          ])))
+        })
+      }
+      if (record.retirementDate != null) {
+        record.retirementDate = this.BaseTool.Moment(record.retirementDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'retirementDate'
+          ])))
+        })
+      }
+      if (record.registerDate != null) {
+        record.registerDate = this.BaseTool.Moment(record.registerDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'registerDate'
+          ])))
+        })
+      }
+      record.unitName = this.BaseTool.Object.getField(this.unitMap, record.unit)
+      record.useTypeName = this.BaseTool.Object.getField(this.useTypeMap, record.useType)
+
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign(pick(record, [
+          'id',
+          'no',
+          'parentId',
+          'parentSbName',
+          'isChild',
+          'isShow',
+          'isFinancing',
+          'financingNo',
+          'financingNoTwo',
+          'financingNoThird',
+          'financingNoFour',
+          'financingNoFive',
+          'name',
+          'model',
+          'cph',
+          'positionId',
+          'producerName',
+          'useArea',
+          'useCompany',
+          'useProject',
+          'useDept',
+          'saveUser',
+          'repairUser',
+          'useGroup',
+          'typeId',
+          'level',
+          'initialValue',
+          // 'cutValue',
+          'producerId',
+          // 'sourceType',
+          'unit',
+          'buyDate',
+          'startDate',
+          'zbh',
+          // 'wbFile',
+          // 'useFile',
+          // 'checkFile',
+          // 'sbImage',
+          'status',
+          'remark',
+          'zzh',
+          'zz',
+          'zjm',
+          'jbdh',
+          'useType',
+          'cardNo',
+          'fdjxh',
+          'checkDate',
+          'checkPeriod',
+          'nextCheckDate',
+          'dph',
+          'zaiz',
+          'rlType',
+          'color',
+          'sbdh',
+          'seatNumber',
+          'registerNo',
+          'characterType',
+          'usedNo',
+          'supplier',
+          'repairUserSecond',
+          'batchNo',
+          'workYear',
+          'retirementDate',
+          'registerDate'
+
+        ])))
+      })
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        // 日期数据的处理
+        values.buyDate = BaseTool.Date.formatter(values.buyDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.startDate = BaseTool.Date.formatter(values.startDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.checkDate = BaseTool.Date.formatter(values.checkDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.nextCheckDate = BaseTool.Date.formatter(values.nextCheckDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.guaranteeDate = BaseTool.Date.formatter(values.guaranteeDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.retirementDate = BaseTool.Date.formatter(values.retirementDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+
+        values.lastRepaireTime = this.BaseTool.Date.formatter(values.lastRepaireTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.lastBaoyangTime = this.BaseTool.Date.formatter(values.lastBaoyangTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.spDate = this.BaseTool.Date.formatter(values.spDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.jbdDate = this.BaseTool.Date.formatter(values.jbdDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.sbdDate = this.BaseTool.Date.formatter(values.sbdDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.sbDate = this.BaseTool.Date.formatter(values.sbDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+
+        // 上传文件
+        values.repairFileList = this.repairFileList
+        values.useFileList = this.useFileList
+        values.recheckFileList = this.recheckFileList
+        values.sbFileList = this.sbFileList
+        values.paramList = JSON.stringify(this.paramList)
+        values.useType = this.useType
+        if (this.BaseTool.String.isBlank(values.id)) {
+          addSbInfo(values)
+            .then(() => {
+              this.handleCancel(values)
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+        } else {
+          if (this.type == null) {
+            updateSbInfo(values)
+              .then(() => {
+                this.handleCancel(values)
+              }).catch(() => {
+                this.confirmLoading = false
+              })
+          } else {
+            copySbInfo(values)
+              .then(() => {
+                this.handleCancel(values)
+              }).catch(() => {
+                this.confirmLoading = false
+              })
+          }
+        }
+      })
+    },
+    getQrcodeSrc () {
+      console.log(111, 22)
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      this.$emit('ok')
+    },
+    handleFresh () {
+      fetchSbInfo({ id: this.id }).then(res => {
+        const { form: { setFieldsValue } } = this
+        const record = res.data
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'zjm',
+            'jbdh'
+          ])))
+        })
+      })
+    },
+    setTree (record = {}) {
+      fetchSbTypeTree().then(res => {
+        this.sbTypeTreeData = res.data
+      })
+      // getSbInfoTree({ id: record.id }).then(res => {
+      //  this.sbInfoTreeData = res.data
+      //  this.sourceSbInfoTreeData = res.data
+      // })
+      // getSbPositionTree().then(res => {
+      //  this.sbPositionTreeData = res.data
+      // })
+      queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then(res => {
+        this.areaList = res.data
+      })
+
+      if (record.useArea != null) {
+        getDeptsAllByParentId({ deptId: record.useArea, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI }).then(res => {
+          this.companyList = res.data
+        })
+        getDeptsAllByParentId({ deptId: record.useCompany, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU }).then(res => {
+          this.projectList = res.data
+        })
+        getDeptsAllByParentId({ deptId: record.useProject, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BU_MEN }).then(res => {
+          this.deptList = res.data
+        })
+        getDeptsAllByParentId({ deptId: record.useDept, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BAN_ZU }).then(res => {
+          this.groupList = res.data
+        })
+        queryUser({ }).then(res => {
+          this.userList = res.data
+        })
+      }
+      queryUser({ }).then(res => {
+        this.userList = res.data
+      })
+    },
+    handleSbModelSelect () {
+      const modal = this.$refs.sbModelSelectModal
+      modal.base()
+    },
+    handleSbModelSelected (keys, rows) {
+      const [ key ] = keys
+      const [ row ] = rows
+      const { form: { setFieldsValue } } = this
+
+      this.$nextTick(() => {
+        setFieldsValue({
+          'modelId': key,
+          'name': row.name,
+          'model': row.model,
+          'nameModel': row.nameModel,
+          'typeId': row.typeId,
+          'typeName': row.typeName,
+          'level': row.level,
+          'initialValue': row.value,
+          'useType': row.useType,
+          'useTypeName': this.BaseTool.Object.getField(this.useTypeMap, row.useType),
+          'producerId': row.producerId,
+          'producerName': row.producerName,
+          'unit': row.unit,
+          'unitName': this.BaseTool.Object.getField(this.unitMap, row.unit)
+        })
+      })
+    },
+
+    beforeRecheckFileListUpload (file) {
+      const reg = /\.(xls|xlsx)(\?.*)?$/
+      return new Promise((resolve, reject) => {
+        if (reg.test(file.name)) {
+          this.recheckFileList = [file]
+          return true
+        } else {
+          this.$message.error(`请上传正确的xls|xlsx文件`)
+          reject(new Error('请上传正确的xls|xlsx文件'))
+          return false
+        }
+      })
+    },
+    beforeUploadPic (file) {
+      const reg = /\.(jpg|jpeg|png)(\?.*)?$/
+      return new Promise((resolve, reject) => {
+        if (reg.test(file.name)) {
+          this.sbFileList = [file]
+          return true
+        } else {
+          this.$message.error(`请上传正确的jpg|jpeg|png文件`)
+          reject(new Error('请上传正确的jpg|jpeg|png文件'))
+          return false
+        }
+      })
+    },
+    clearFileList () {
+      this.repairFileList = []
+      this.useFileList = []
+      this.recheckFileList = []
+      this.sbFileList = []
+    },
+    handleRepairFileChange (info) {
+      this.defaultRepairFileList = info.fileList
+      this.repairFileList = this.setFileList(info, 1)
+    },
+    handleUseFileChange (info) {
+      this.defaultUseFileList = info.fileList
+      this.useFileList = this.setFileList(info, 2)
+    },
+    handleAreaChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI }).then(res => {
+        this.companyList = res.data
+      })
+    },
+    handleCompanyChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU }).then(res => {
+        this.projectList = res.data
+      })
+    },
+    handleProjectChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BU_MEN }).then(res => {
+        this.deptList = res.data
+      })
+    },
+    handleDeptChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BAN_ZU }).then(res => {
+        this.groupList = res.data
+      })
+    },
+    handleGroupChange (value) {
+      queryUserDeptByUserDeptId({ deptId: value }).then(res => {
+        this.userList = res.data
+      })
+    },
+    handleRecheckFileChange (info) {
+      this.defaultRecheckFileList = info.fileList
+      this.recheckFileList = this.setFileList(info, 3)
+    },
+    handleSbFileChange (info) {
+      this.defaultSbFileList = info.fileList
+      this.sbFileList = this.setFileList(info, 4)
+    },
+    setFileList1 (info, type) {
+      const fileList = [...info.fileList]
+      const file = [...info.file]
+      if (file.status === 'done') {
+        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
+      } else if (file.status === 'removed') {
+        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
+      } else if (file.status === 'error') {
+        this.$message.error('上传失败')
+        return []
+      }
+    },
+    clearParent () {
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign({
+          'parentId': null,
+          'parentSbName': null
+        }))
+      })
+    },
+    // 主子设备切换
+    childChange (value) {
+      if (value === this.DictCache.VALUE.SB_IS_CHILD.IS_PARENT || value === this.DictCache.VALUE.SB_IS_CHILD.IS_NORMAL) {
+        const { form: { setFieldsValue } } = this
+        // 日期处理
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign({
+            'parentId': null,
+            'parentSbName': null
+          }))
+        })
+      }
+    },
+    handleSbSelect () {
+      this.$refs.sbInfoSelectModal.base({}, { isChild: this.DictCache.VALUE.SB_IS_CHILD.IS_PARENT })
+    },
+    handleSbSelectd (keys, rows) {
+      const [ key ] = keys
+      const [ row ] = rows
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign({
+          'parentId': key,
+          'parentSbName': row.name,
+          'isChild': this.DictCache.VALUE.SB_IS_CHILD.IS_CHILD
+        }))
+      })
+    },
+    handleChange (value) {
+      this.useType = value
+    },
+    handleProducerSelect () {
+      const modal = this.$refs.producerSelectModal
+      modal.base({}, { type: 1 })
+    },
+    handleProducerSelected (record, selectedRowKeys, selectedRow) {
+      const { form: { setFieldsValue } } = this
+      const [ key ] = selectedRowKeys
+      const [ row ] = selectedRow
+      setFieldsValue({
+        'producerId': key,
+        'producerName': row.name
+      })
+    },
+    setFileList (info, type) {
+      // { file, fileList }
+
+      const file = info.file
+      const fileList = info.fileList
+      // fileList = fileList.slice(-2)
+      // console.log(111, this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type))
+
+      if (file.status === 'done') {
+        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
+      } else if (file.status === 'removed') {
+        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
+      } else if (file.status === 'error') {
+        this.$message.error('上传失败')
+        return null
+      }
+    },
+    handlePoint () {
+      const { form: { getFieldValue } } = this
+      const zjm = getFieldValue('zjm')
+      const jbdh = getFieldValue('jbdh')
+      const a = document.createElement('a')
+      a.href = '/hitch-screen/point.html?id=' + this.id + '&zjm=' + zjm + '&jbdh=' + jbdh
+      a.target = '_blank'
+      a.click()
+    },
+    handleParam () {
+      const modal = this.$refs.paramForm
+      modal.base(this.model)
+    },
+    handleParamList (values) {
+      console.log(values)
+      if (this.paramList == null) {
+        this.paramList = []
+      }
+      this.paramList.push(values)
+    },
+    handleDelParam (index) {
+      console.log(index)
+      this.paramList.splice(index, 1)
+    }
+  }
+}
+</script>

+ 424 - 0
src/views/store/instoreform/modules/BaseFormBak.vue

@@ -0,0 +1,424 @@
+<template>
+  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+    <a-form :form="form">
+      <a-form-item v-show="false" >
+        <a-input v-decorator="['id']" type="hidden"/>
+        <a-input v-decorator="['storeId']" type="hidden"/>
+      </a-form-item>
+      <a-row :gutter="24">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="样品信息"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param1', {rules: [{required: false, message: '入库单号不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="检测编号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param2']" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="选择车间"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['param3']" placeholder="请选择">
+              <a-select-option value="一号车间">
+                一号车间
+              </a-select-option>
+              <a-select-option value="二号车间">
+                二号车间
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="水分/ppm"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param4']" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="固含量"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param5', {rules: [{required: true, message: '不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="送样时间"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-date-picker
+              style="width: 100%"
+              :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+              v-decorator="['param6']" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="检测时间"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-date-picker
+              style="width: 100%"
+              :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+              v-decorator="['param7']" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+    <a-row :gutter="48">
+      <a-col :md="48" :sm="48">
+        <span class="table-page-search-submitButtons" style="float: right;margin-top: 10px">
+          <a-button type="primary" @click="save()">提交</a-button>
+          <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+        </span>
+      </a-col>
+    </a-row>
+  </a-card>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import { addInStoreForm, updateInStoreForm } from '@/api/store/instoreform'
+import DetailBaseForm from './DetailBaseForm'
+import PurchaseOrderSelectModal from '@/views/purchase/purchase-order/modules/PurchaseOrderSelectModal'
+import StoreSelectModal from '@/views/store/store/modules/StoreSelectModal'
+import SparePartInfoSelectModal from '@/views/sqarepartmanage/sparepartinfo/modules/SparePartInfoSelectModal'
+import SpareStoreSelectModal from '@/views/store/sparestore/modules/SpareStoreSelectModal'
+import { queryUsersByParentDeptNatureAll } from '@/api/upms/user'
+import BaseTool from '@/utils/tool'
+
+export default {
+  name: 'BaseInStoreForm',
+  components: {
+    DetailBaseForm,
+    StoreSelectModal,
+    SparePartInfoSelectModal,
+    PurchaseOrderSelectModal,
+    SpareStoreSelectModal
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: false,
+      maskClosable: false,
+      storeId: null,
+      typeMap: {},
+      userList: {},
+      rowSelection: {
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.selectedRows = selectedRows
+        }
+      },
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '备件名称',
+          dataIndex: 'spareId',
+          customRender: (text, record, index) => {
+            return record.spareName
+          }
+        },
+        {
+          title: '编号',
+          dataIndex: 'no'
+        },
+        {
+          title: '备件规格',
+          dataIndex: 'ggxh'
+        },
+        {
+          title: '原厂编号',
+          dataIndex: 'initNo'
+        },
+        {
+          title: '数量',
+          dataIndex: 'num',
+          width: 120,
+          scopedSlots: { customRender: 'num' }
+        },
+        {
+          title: '单价',
+          dataIndex: 'price',
+          width: 150,
+          scopedSlots: { customRender: 'price' }
+        },
+        {
+          title: '总价',
+          dataIndex: 'totalPrice',
+          width: 150,
+          scopedSlots: { customRender: 'totalPrice' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      data: [],
+      user: this.$store.getters.userInfo,
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys
+        }
+      }
+    }
+  },
+  props: {
+  },
+  created () {
+    // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.IN_STORE_FORM_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      const params = { includeMy: true, deptId: this.user.companyId }
+      params.nature = this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI
+      queryUsersByParentDeptNatureAll(params).then(res => {
+        this.userList = res.data
+      })
+      // 如果是空标识添加
+      if (this.BaseTool.Object.isBlank(record)) {
+        this.modalTitle = '添加'
+        this.data = []
+        return
+      }
+      this.modalTitle = '编辑'
+      this.storeId = record.storeId
+      record.userTime = this.BaseTool.Moment(record.userTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign(pick(record, [
+          'id',
+          'inNo',
+          'storeId',
+          'userId',
+          'userTime',
+          'storeName',
+          'purchaseId',
+          'purchaseDispatchOrderId',
+          'type',
+          'remark'
+        ])))
+      })
+      this.data = record.detailList
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        values.param6 = this.BaseTool.Date.formatter(values.param6, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+        values.param7 = this.BaseTool.Date.formatter(values.param7, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+        this.$message.info('更新成功')
+        this.confirmLoading = false
+        localStorage.setItem('test', JSON.stringify(values))
+      })
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        this.$emit('ok', values)
+      } else {
+        this.$emit('ok')
+      }
+    },
+    handleStoreSelect () {
+      this.$refs.storeSelectModal.base({}, { filter: -1 })
+    },
+    handleStoreSelected (record, keys, rows) {
+      // 重新选择了仓库,则明细需要全部清空
+      this.data = []
+      const [ key ] = keys
+      const [ row ] = rows
+      const { form: { setFieldsValue } } = this
+      this.storeId = key
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign({
+          'storeId': key,
+          'storeName': row.name
+        }))
+      })
+    },
+    handlePurchaseOrderSelect () {
+      this.$refs.purchaseOrderSelectModal.base({}, { filter: 0 })
+    },
+    handlePurchaseOrderSelected (record, keys, rows) {
+      const [ key ] = keys
+      const [ row ] = rows
+      const { form: { setFieldsValue } } = this
+      this.storeId = key
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign({
+          'storeId': key,
+          'storeName': row.name
+        }))
+      })
+    },
+    handleDetailSelect (record) {
+      this.$refs.detailBaseForm.base(record)
+    },
+    handleDetailSelected (values) {
+      const newData = [...this.data]
+      for (let j = 0; j < newData.length; j++) {
+        if (values.id === newData[j].id) {
+          newData[j].num = values.num
+          newData[j].price = values.price
+          newData[j].totalPrice = values.totalPrice
+          break
+        }
+      }
+      this.data = newData
+    },
+    handleDel (id) {
+      const data = [...this.data]
+      if (this.selectedRowKeys.length === 0) {
+        this.$message.error('请至少选择一条数据')
+        return
+      }
+      this.data = data.filter(item => !this.selectedRowKeys.includes(item.id))
+    },
+    handleDelOne (id) {
+      const data = [...this.data]
+      this.data = data.filter(item => id !== item.id)
+    },
+    handleSpareStoreSelect () {
+      if (this.storeId == null) {
+        this.$message.error('请先选择入库仓库')
+        return
+      }
+      this.$refs.spareStoreSelectModal.base({}, { storeId: this.storeId })
+    },
+    handleSpareStoreSelected (record, keys, rows) {
+      const { data } = this
+      for (let i = 0; i < rows.length; i++) {
+        var find = false
+        for (let j = 0; j < data.length; j++) {
+          if (rows[i].spareId === data[j].spareId) {
+            find = true
+            break
+          }
+        }
+        if (!find) {
+          const selectData = rows[i]
+          selectData.num = 1
+          selectData.totalPrice = selectData.price
+          data.push(selectData)
+        }
+      }
+    },
+    handleSpareSelect () {
+      this.$refs.spareSelectModal.base()
+    },
+    handleSpareSelected (record, keys, rows) {
+      const { data } = this
+      for (let i = 0; i < rows.length; i++) {
+        var find = false
+        for (let j = 0; j < data.length; j++) {
+          if (rows[i].spareId === data[j].spareId) {
+            find = true
+            break
+          }
+        }
+        if (!find) {
+          const selectData = rows[i]
+          selectData.num = 1
+          selectData.spareId = rows[i].id
+          selectData.spareName = rows[i].name
+          selectData.price = rows[i].initialValue
+          selectData.totalPrice = selectData.price
+          data.push(selectData)
+        }
+      }
+    },
+    onQuantityChange (e, id, attr) {
+      const value = e.target.value
+      console.log(value)
+      if (value !== 0 && !value) {
+        return
+      }
+      const data = [...this.data]
+      const target = data.find(item => item.id === id)
+      if (target) {
+        target[attr] = value
+        target['totalPrice'] = Math.floor(value * target['price'] * 10000) / 10000
+        this.data = data
+      }
+    },
+    onPriceChange (e, id, attr) {
+      const value = e.target.value
+      console.log(value)
+      if (value !== 0 && !value) {
+        return
+      }
+      const data = [...this.data]
+      const target = data.find(item => item.id === id)
+      if (target) {
+        target[attr] = value
+        target['totalPrice'] = Math.floor(value * target['num'] * 10000) / 10000
+        this.data = data
+      }
+    },
+    onTotalPriceChange (e, id, attr) {
+      const value = e.target.value
+      console.log(value)
+      if (value !== 0 && !value) {
+        return
+      }
+      const data = [...this.data]
+      const target = data.find(item => item.id === id)
+      if (target) {
+        target[attr] = value
+        target['price'] = Math.floor(value * 10000 / target['num']) / 10000
+        this.data = data
+      }
+    }
+
+  }
+}
+</script>

+ 238 - 0
src/views/test/BaseFormBak.vue

@@ -0,0 +1,238 @@
+<template>
+  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+    <h1 style="margin:20px auto; text-align: center"> 质量数据录入界面 </h1>
+    <a-form :form="form">
+      <a-form-item v-show="false" >
+        <a-input v-decorator="['id']" type="hidden"/>
+        <a-input v-decorator="['storeId']" type="hidden"/>
+      </a-form-item>
+      <a-row :gutter="24">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="样品信息"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param1', {rules: [{required: false, message: '入库单号不能为空'}]}]" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="检测编号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param2']" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="选择车间"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['param3']" placeholder="请选择">
+              <a-select-option value="一号车间">
+                一号车间
+              </a-select-option>
+              <a-select-option value="二号车间">
+                二号车间
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="水分/ppm"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['param4']"
+              suffix="%" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="固含量"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              style="width:70%"
+              v-decorator="['param5', {rules: [{required: true, message: '不能为空'}]}]" />
+            <a-button type="primary" style="width:30%" @click="showModel">选择公式</a-button>
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="送样时间"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-date-picker
+              style="width: 100%"
+              :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+              v-decorator="['param6']" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="检测时间"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-date-picker
+              style="width: 100%"
+              :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+              v-decorator="['param7']" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+    <a-row :gutter="48">
+      <a-col :md="48" :sm="48">
+        <span class="table-page-search-submitButtons" style="float: right;margin-top: 10px">
+          <a-button type="primary" @click="save()">提交</a-button>
+          <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+        </span>
+      </a-col>
+    </a-row>
+  </a-card>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+
+export default {
+  name: 'BaseInStoreForm',
+  components: {
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: true,
+      maskClosable: false,
+      storeId: null,
+      typeMap: {},
+      userList: {},
+      rowSelection: {
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.selectedRows = selectedRows
+        }
+      },
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '备件名称',
+          dataIndex: 'spareId',
+          customRender: (text, record, index) => {
+            return record.spareName
+          }
+        },
+        {
+          title: '编号',
+          dataIndex: 'no'
+        },
+        {
+          title: '备件规格',
+          dataIndex: 'ggxh'
+        },
+        {
+          title: '原厂编号',
+          dataIndex: 'initNo'
+        },
+        {
+          title: '数量',
+          dataIndex: 'num',
+          width: 120,
+          scopedSlots: { customRender: 'num' }
+        },
+        {
+          title: '单价',
+          dataIndex: 'price',
+          width: 150,
+          scopedSlots: { customRender: 'price' }
+        },
+        {
+          title: '总价',
+          dataIndex: 'totalPrice',
+          width: 150,
+          scopedSlots: { customRender: 'totalPrice' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      data: [],
+      user: this.$store.getters.userInfo,
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys
+        }
+      }
+    }
+  },
+  props: {
+  },
+  created () {
+    // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.IN_STORE_FORM_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      // 如果是空标识添加
+      if (this.BaseTool.Object.isBlank(record)) {
+        this.modalTitle = '添加'
+        this.data = []
+      }
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        values.param6 = this.BaseTool.Date.formatter(values.param6, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+        values.param7 = this.BaseTool.Date.formatter(values.param7, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+        this.$message.info('更新成功')
+        this.confirmLoading = false
+        localStorage.setItem('test', JSON.stringify(values))
+      })
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        this.$emit('ok', values)
+      } else {
+        this.$emit('ok')
+      }
+    },
+    showModel () {
+      this.$message.info('后期如果配置了公式,这里则可以选择计算公示,自动计算。')
+    }
+  }
+}
+</script>

Some files were not shown because too many files changed in this diff