Browse Source

联调数据

master
xuhuajiao 2 years ago
parent
commit
a7abc13ac5
  1. 4
      .env.development
  2. 1
      package.json
  3. 157
      src/api/library.js
  4. 322
      src/assets/js/tagcloud-2.2.js
  5. 460
      src/assets/js/tagscloud.js
  6. 12
      src/assets/styles/font-some.css
  7. 98
      src/assets/styles/index.scss
  8. 10
      src/utils/request.js
  9. 207
      src/views/index.vue
  10. 316
      src/views/map/index.vue
  11. 648
      src/views/pageOne/data.json
  12. 422
      src/views/pageOne/index.vue
  13. 6
      vue.config.js

4
.env.development

@ -3,8 +3,8 @@ ENV = 'development'
# 接口地址
# 许镇-本地服地址
VUE_APP_BASE_API = 'http://192.168.99.67:8080/'
VUE_APP_WS_API = 'ws://192.168.99.67:8081/'
VUE_APP_BASE_API = 'http://192.168.99.67:8080'
VUE_APP_LIB_API = 'http://118.253.150.248:8099'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true

1
package.json

@ -18,6 +18,7 @@
"element-ui": "^2.15.10",
"jquery": "^3.7.1",
"svg-sprite-loader": "^6.0.11",
"TagCloud": "^2.5.0",
"vue": "^2.6.11",
"vue-awesome": "^4.0.2",
"vue-count-to": "^1.0.13",

157
src/api/library.js

@ -1,19 +1,30 @@
import request from '@/utils/request'
import qs from 'qs'
// 获取初始化数据
export function FetchInitSetting(params) {
// 获取token
export function FetchInitToken(params) {
return request({
url: '/qyzt/initSetting' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
url: '/openlib/service/barcode/token' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'interlib'
})
}
// page1 云标签
export function FetchHotSearch(params) {
// 馆藏量
export function FetchLibBookTotal(params) {
return request({
url: '/qyzt/getHotSearch' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
url: '/qyzt/sync35' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
// 办证量统计
export function FetchUsertotal(params) {
return request({
url: '/qyzt/usertotal' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
@ -21,94 +32,74 @@ export function FetchHotSearch(params) {
export function FetchFansCount(params) {
return request({
url: '/qyzt/getfansCount' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
method: 'get',
urlType: 'local'
})
}
// page1 新书推荐
export function FetchNewBook(params) {
// page1 累计借出
export function FetchLendingTotal(params) {
return request({
url: '/qyzt/getNewBook' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
url: '/qyzt/sync82' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
// // 借阅排行榜
// export function FetchBorrowRank(params) {
// return request({
// url: '/dxhtsg/borrowRank',
// method: 'get',
// params: params
// })
// }
// // 阅读之星
// export function FetchBorrowStar(params) {
// return request({
// url: '/dxhtsg/borrowStar',
// method: 'get',
// params: params
// })
// }
// // 新书推荐
// export function FetchNewBookRecommend(params) {
// return request({
// url: '/dxhtsg/newBookRecommend',
// method: 'get',
// params: params
// })
// }
// // 通知公告
// export function FetchInitNotice(params) {
// return request({
// url: '/dxhtsg/initNotice',
// method: 'get',
// params: params
// })
// }
// 获取初始化数据
export function FetchInitSetting(params) {
return request({
url: '/qyzt/initSetting' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
// // 进馆人数
// export function FetchInitIntoNum(params) {
// return request({
// url: '/dxhtsg/initIntoNum',
// method: 'get',
// params: params
// })
// }
// page1 云标签
export function FetchHotSearch(params) {
return request({
url: '/qyzt/getHotSearch' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
// // 24小时借还量
// export function FetchHalfYearBRNum(params) {
// return request({
// url: '/dxhtsg/getHalfYearBRNum',
// method: 'get',
// params: params
// })
// }
// page1 新书推荐
export function FetchNewBook(params) {
return request({
url: '/qyzt/getNewBook' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
// // 大屏幕播放文件
// export function FetchShowFileList(params) {
// return request({
// url: '/dxhtsg/showFileList',
// method: 'get',
// params: params
// })
// }
// page2 获取分馆显示内容
export function FetchLibcodeDetails(params) {
return request({
url: '/qyzt/getLibcodeDetails' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
// // 通过isbn获取图书封面
// export function FetchCoverByISBN(params) {
// return request({
// url: '/dxhtsg/getCoverByISBN',
// method: 'get',
// params: params
// // responseType: 'blob'
// })
// }
// page2 读者借阅排行榜
export function FetchReadRanking(params) {
return request({
url: '/qyzt/sync37' + '?' + qs.stringify(params, { indices: false }),
method: 'get',
urlType: 'local'
})
}
export default {
FetchInitToken,
FetchLibBookTotal,
FetchUsertotal,
FetchFansCount,
FetchLendingTotal,
FetchInitSetting,
FetchHotSearch,
FetchFansCount,
FetchNewBook
FetchNewBook,
FetchReadRanking,
FetchLibcodeDetails
}

322
src/assets/js/tagcloud-2.2.js

@ -1,322 +0,0 @@
/*
* 3d标签云
* 功能鼠标移入标签当前标签静止放大
* 说明radius 控制滚动区域横椭圆纵椭圆正圆
* 版本2.2
* */
window.tagCloud = (function(win, doc) {
// 判断对象
function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]'
}
// 构造函数
function TagCloud(options) {
var self = this
self.config = TagCloud._getConfig(options)
self.box = self.config.element // 组件元素
self.fontsize = self.config.fontsize // 平均字体大小
if (Number.isInteger(self.config.radius)) {
self._radiusX = self._radiusY = self.config.radius
} else if (self.config.radius instanceof Array) {
if (self.config.radius.length === 1) {
self._radiusX = self._radiusY = self.config.radius[0]
} else {
self._radiusX = self.config.radius[0]
self._radiusY = self.config.radius[1]
}
}
self.radius = self._radiusX // 滚动半径
_ratio = Math.round(self._radiusX * 10 / self._radiusY) / 10 // 滚动区域比例,保留一位小数
if (_ratio < 1) { // 焦点在Y轴的椭圆
self.ratioX = _ratio
self.ratioY = 1
self.radius = self._radiusY // 滚动半径,选择长半径
} else if (_ratio > 1) { // 焦点在X轴的椭圆
self.ratioX = 1
self.ratioY = _ratio
} else {
self.ratioX = self.ratioY = 1 // 正圆
}
self.depth = 2 * self.radius // 滚动深度
self.size = 2 * self.radius // 随鼠标滚动变速作用区域
self.mspeed = TagCloud._getMsSpeed(self.config.mspeed)
self.ispeed = TagCloud._getIsSpeed(self.config.ispeed)
self.items = self._getItems()
self.direction = self.config.direction // 初始滚动方向
self.keep = self.config.keep // 鼠标移出后是否保持之前滚动
// 初始化
self.active = false // 是否为激活状态
self.lasta = 1
self.lastb = 1
self.mouseX0 = self.ispeed * Math.sin(self.direction * Math.PI / 180) // 鼠标与滚动圆心x轴初始距离
self.mouseY0 = -self.ispeed * Math.cos(self.direction * Math.PI / 180) // 鼠标与滚动圆心y轴初始距离
self.mouseX = self.mouseX0 // 鼠标与滚动圆心x轴距离
self.mouseY = self.mouseY0 // 鼠标与滚动圆心y轴距离
self.index = -1
// 鼠标移入
TagCloud._on(self.box, 'mouseover', function() {
self.active = true
})
// 鼠标移出
TagCloud._on(self.box, 'mouseout', function() {
self.active = false
})
// 鼠标在内移动
TagCloud._on(self.keep ? win : self.box, 'mousemove', function(ev) {
var oEvent = win.event || ev
var boxPosition = self.box.getBoundingClientRect()
self.mouseX = (oEvent.clientX - (boxPosition.left + self.box.offsetWidth / 2)) / 5
self.mouseY = (oEvent.clientY - (boxPosition.top + self.box.offsetHeight / 2)) / 5
})
for (var j = 0, len = self.items.length; j < len; j++) {
self.items[j].element.index = j
// 鼠标移出子元素,当前元素静止放大
self.items[j].element.onmouseover = function() {
self.index = this.index
}
// 鼠标移出子元素,当前元素继续滚动
self.items[j].element.onmouseout = function() {
self.index = -1
}
}
// 定时更新
TagCloud.boxs.push(self.box)
self.update(self) // 初始更新
self.box.style.visibility = 'visible'
self.box.style.position = 'relative'
for (var j = 0, len = self.items.length; j < len; j++) {
self.items[j].element.style.position = 'absolute'
self.items[j].element.style.zIndex = j + 1
}
self.up = setInterval(function() {
self.update(self)
}, 30)
}
// 实例
TagCloud.boxs = [] // 实例元素数组
// 静态方法们
TagCloud._set = function(element) {
if (TagCloud.boxs.indexOf(element) === -1) { // ie8不支持数组的indexOf方法,所以自定义indexOf
return true
}
}
// 添加数组IndexOf方法
if (!Array.prototype.indexOf) {
// Array.prototype.indexOf = function (elt /*, from*/) {
Array.prototype.indexOf = function(elt) {
var len = this.length >>> 0
var from = Number(arguments[1]) || 0
from = (from < 0)
? Math.ceil(from)
: Math.floor(from)
if (from < 0) { from += len }
for (; from < len; from++) {
if (from in this && this[from] === elt) { return from }
}
return -1
}
}
TagCloud._getConfig = function(config) {
var defaultConfig = { // 默认值
fontsize: 16, // 基本字体大小, 单位px
radius: 60, // 滚动纵轴半径, 默认60, 单位px,取值60,[60],[60, 60]
mspeed: 'normal', // 滚动最大速度, 取值: slow, normal(默认), fast
ispeed: 'normal', // 滚动初速度, 取值: slow, normal(默认), fast
direction: 135, // 初始滚动方向, 取值角度(顺时针360): 0对应top, 90对应left, 135对应right-bottom(默认)...
keep: true, // 鼠标移出组件后是否继续随鼠标滚动, 取值: false, true(默认) 对应 减速至初速度滚动, 随鼠标滚动
multicolour: true // 是否为彩色字体,颜色随机,取值:true(默认),false
}
if (isObject(config)) {
for (var i in config) {
if (config.hasOwnProperty(i)) { // hasOwnProperty()用来判断一个属性是定义在对象本身而不是继承自原型链
defaultConfig[i] = config[i] // 用户配置
}
}
}
return defaultConfig// 配置 Merge
}
TagCloud._getMsSpeed = function(mspeed) { // 滚动最大速度
var speedMap = {
slow: 1.5,
normal: 3,
fast: 5
}
return speedMap[mspeed] || 3
}
TagCloud._getIsSpeed = function(ispeed) { // 滚动初速度
var speedMap = {
slow: 10,
normal: 25,
fast: 50
}
return speedMap[ispeed] || 25
}
TagCloud._getSc = function(a, b) {
var l = Math.PI / 180
// 数组顺序0,1,2,3表示asin,acos,bsin,bcos
return [
Math.sin(a * l),
Math.cos(a * l),
Math.sin(b * l),
Math.cos(b * l)
]
}
TagCloud._on = function(ele, eve, handler, cap) {
if (ele.addEventListener) {
ele.addEventListener(eve, handler, cap)
} else if (ele.attachEvent) {
ele.attachEvent('on' + eve, handler)
} else {
ele['on' + eve] = handler
}
}
// 原型方法
TagCloud.prototype = {
constructor: TagCloud, // 反向引用构造器
update: function() {
var self = this; var a; var b
if (!self.active && !self.keep) {
self.mouseX = Math.abs(self.mouseX - self.mouseX0) < 1 ? self.mouseX0 : (self.mouseX + self.mouseX0) / 2 // 重置鼠标与滚动圆心x轴距离
self.mouseY = Math.abs(self.mouseY - self.mouseY0) < 1 ? self.mouseY0 : (self.mouseY + self.mouseY0) / 2 // 重置鼠标与滚动圆心y轴距离
}
a = -(Math.min(Math.max(-self.mouseY, -self.size), self.size) * 2 / self.radius) * self.mspeed
b = (Math.min(Math.max(-self.mouseX, -self.size), self.size) * 2 / self.radius) * self.mspeed
if (Math.abs(a) <= 0.01 && Math.abs(b) <= 0.01) { return }
self.lasta = a
self.lastb = b
var sc = TagCloud._getSc(a, b)
for (var j = 0, len = self.items.length; j < len; j++) {
var rx1 = self.items[j].x
var ry1 = self.items[j].y * sc[1] + self.items[j].z * (-sc[0])
var rz1 = self.items[j].y * sc[0] + self.items[j].z * sc[1]
var rx2 = rx1 * sc[3] + rz1 * sc[2]
var ry2 = ry1
var rz2 = rz1 * sc[3] - rx1 * sc[2]
if (self.index == j) {
self.items[j].scale = 1 // 取值范围0.6 ~ 3
self.items[j].fontsize = 18
self.items[j].alpha = 1
self.items[j].element.style.zIndex = 99
} else {
var per = self.depth / (self.depth + rz2)
self.items[j].x = rx2
self.items[j].y = ry2
self.items[j].z = rz2
self.items[j].scale = per // 取值范围0.6 ~ 3
self.items[j].fontsize = Math.ceil(per * 2) + self.fontsize - 6
self.items[j].alpha = 1.5 * per - 0.5
self.items[j].element.style.zIndex = Math.ceil(per * 10 - 5)
}
self.items[j].element.style.fontSize = self.items[j].fontsize + 'px'
self.items[j].element.style.left = self.items[j].x * self.ratioX + (self.box.offsetWidth - self.items[j].offsetWidth) / 2 + 'px'
self.items[j].element.style.top = self.items[j].y / self.ratioY + (self.box.offsetHeight - self.items[j].offsetHeight) / 2 + 'px'
self.items[j].element.style.filter = 'alpha(opacity=' + 100 * self.items[j].alpha + ')'
self.items[j].element.style.opacity = self.items[j].alpha
}
},
_getItems: function() {
var self = this
var items = []
var element = self.box.children // children 全部是Element
var length = element.length
var item
for (var i = 0; i < length; i++) {
item = {}
item.angle = {}
item.angle.phi = Math.acos(-1 + (2 * i + 1) / length)
item.angle.theta = Math.sqrt((length + 1) * Math.PI) * item.angle.phi
item.element = element[i]
item.offsetWidth = item.element.offsetWidth
item.offsetHeight = item.element.offsetHeight
item.x = self.radius / 2 * 1.5 * Math.cos(item.angle.theta) * Math.sin(item.angle.phi)
item.y = self.radius / 2 * 1.5 * Math.sin(item.angle.theta) * Math.sin(item.angle.phi)
item.z = self.radius / 2 * 1.5 * Math.cos(item.angle.phi)
item.element.style.left = item.x * self.ratioX + (self.box.offsetWidth - item.offsetWidth) / 2 + 'px'
item.element.style.top = item.y / self.ratioY + (self.box.offsetHeight - item.offsetHeight) / 2 + 'px'
if (self.config.multicolour) { // 初始化文字颜色为彩色
_color = self._randomNumBoth(0, 360) // 定义色相 (0 到 360) - 0 (或 360) 红,120绿,180青,240蓝,300紫
_light = self._randomNumBoth(30, 60) // 定义亮度 0% 为暗, 50% 为普通, 100% 为白
item.element.style.color = 'hsl(' + _color + ', 100%, ' + _light + '%)' // 中间值为饱和度; 0%灰色,100%全色
// item.element.style.color = 'rgb(' + parseInt(Math.random() * 255) + ',' + parseInt(Math.random() * 255) + ',' + parseInt(Math.random() * 255) + ')';
}
items.push(item)
}
return items // 单元素数组
},
// 取随机值,Min ≤ num ≤ Max
_randomNumBoth: function(Min, Max) {
var Range = Max - Min
var Rand = Math.random()
var num = Min + Math.round(Rand * Range) // 四舍五入
return num
}
}
if (!doc.querySelectorAll) { // ie7不支持querySelectorAll,所以要重新定义
doc.querySelectorAll = function(selectors) {
var style = doc.createElement('style'); var elements = []; var element
doc.documentElement.firstChild.appendChild(style)
doc._qsa = []
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'
window.scrollBy(0, 0)
style.parentNode.removeChild(style)
while (doc._qsa.length) {
element = doc._qsa.shift()
element.style.removeAttribute('x-qsa')
elements.push(element)
}
doc._qsa = null
return elements
}
}
return function(options) { // factory
options = options || {} // 短路语法
var selector = options.selector || '.tagcloud' // 默认选择class为tagcloud的元素
var elements = doc.querySelectorAll(selector)
var instance = []
for (var index = 0, len = elements.length; index < len; index++) {
options.element = elements[index]
if (TagCloud._set(options.element)) {
instance.push(new TagCloud(options))
}
}
return instance
}
})(window, document)

460
src/assets/js/tagscloud.js

@ -1,150 +1,336 @@
// JavaScript Document
var radius = 160
var d = 200
var dtr = Math.PI / 180
var mcList = []
var lasta = 1
var lastb = 1
var distr = true
var tspeed = 4
var size = 200
var mouseX = 0
var mouseY = 20
var howElliptical = 1
var aA = null
var oDiv = null
window.onload = function() {
var i = 0
var oTag = null
oDiv = document.getElementById('tagscloud')
aA = oDiv.getElementsByTagName('a')
for (i = 0; i < aA.length; i++) {
oTag = {}
aA[i].onmouseover = (function(obj) {
return function() {
obj.on = true
this.style.zIndex = 9999
this.style.color = '#fff'
this.style.padding = '5px 5px'
this.style.filter = 'alpha(opacity=100)'
this.style.opacity = 1
}
})(oTag)
aA[i].onmouseout = (function(obj) {
return function() {
obj.on = false
this.style.zIndex = obj.zIndex
this.style.color = '#fff'
this.style.padding = '5px'
this.style.filter = 'alpha(opacity=' + 100 * obj.alpha + ')'
this.style.opacity = obj.alpha
this.style.zIndex = obj.zIndex
}
})(oTag)
oTag.offsetWidth = aA[i].offsetWidth
oTag.offsetHeight = aA[i].offsetHeight
mcList.push(oTag)
/**
* TagCloud.js (c) 2016-2019 @ Cong Min
* MIT License - https://github.com/cong-min/TagCloud
*/
class TagCloud {
/* constructor */
constructor(container = document.body, texts, options) {
const self = this
if (!container || container.nodeType !== 1) return new Error('Incorrect element type')
// params
self.$container = container
self.texts = texts || []
self.config = { ...TagCloud._defaultConfig, ...options || {}}
// calculate config
self.radius = self.config.radius // rolling radius
self.depth = 2 * self.radius // rolling depth
self.size = 1.5 * self.radius // rolling area size with mouse
self.maxSpeed = TagCloud._getMaxSpeed(self.config.maxSpeed) // rolling max speed
self.initSpeed = TagCloud._getInitSpeed(self.config.initSpeed) // rolling init speed
self.direction = self.config.direction // rolling init direction
self.keep = self.config.keep // whether to keep rolling after mouse out area
self.paused = false // keep state to pause the animation
// create element
self._createElment()
// init
self._init()
// set elements and instances
TagCloud.list.push({ el: self.$el, container, instance: self })
}
sineCosine(0, 0, 0)
positionAll();
(function() {
update()
setTimeout(arguments.callee, 40)
})()
}
function update() {
var a; var b; var c = 0
a = (Math.min(Math.max(-mouseY, -size), size) / radius) * tspeed
b = (-Math.min(Math.max(-mouseX, -size), size) / radius) * tspeed
lasta = a
lastb = b
if (Math.abs(a) <= 0.01 && Math.abs(b) <= 0.01) {
return
/* static method */
// all TagCloud list
static list = [];
// default config
static _defaultConfig = {
radius: 100, // rolling radius, unit `px`
maxSpeed: 'normal', // rolling max speed, optional: `slow`, `normal`(default), `fast`
initSpeed: 'normal', // rolling init speed, optional: `slow`, `normal`(default), `fast`
direction: 135, // rolling init direction, unit clockwise `deg`, optional: `0`(top) , `90`(left), `135`(right-bottom)(default)...
keep: true, // whether to keep rolling after mouse out area, optional: `false`, `true`(default)(decelerate to rolling init speed, and keep rolling with mouse)
reverseDirection: false,
useContainerInlineStyles: true,
useItemInlineStyles: true,
containerClass: 'tagcloud',
itemClass: 'tagcloud--item',
useHTML: false
};
// speed value
static _getMaxSpeed = (name) => ({ slow: 0.5, normal: 1, fast: 2 })[name] || 1;
static _getInitSpeed = (name) => ({ slow: 16, normal: 32, fast: 80 })[name] || 32;
// event listener
static _on(el, ev, handler, cap) {
if (el.addEventListener) {
el.addEventListener(ev, handler, cap)
} else if (el.attachEvent) {
el.attachEvent(`on${ev}`, handler)
} else {
el[`on${ev}`] = handler
}
}
sineCosine(a, b, c)
for (var i = 0; i < mcList.length; i++) {
if (mcList[i].on) {
continue
/* instance property method */
// create elment
_createElment() {
const self = this
// create container
const $el = document.createElement('div')
$el.className = self.config.containerClass
if (self.config.useContainerInlineStyles) {
$el.style.position = 'relative'
$el.style.width = `${2 * self.radius}px`
$el.style.height = `${2 * self.radius}px`
}
var rx1 = mcList[i].cx
var ry1 = mcList[i].cy * ca + mcList[i].cz * (-sa)
var rz1 = mcList[i].cy * sa + mcList[i].cz * ca
var rx2 = rx1 * cb + rz1 * sb
var ry2 = ry1
var rz2 = rx1 * (-sb) + rz1 * cb
var rx3 = rx2 * cc + ry2 * (-sc)
var ry3 = rx2 * sc + ry2 * cc
var rz3 = rz2
mcList[i].cx = rx3
mcList[i].cy = ry3
mcList[i].cz = rz3
per = d / (d + rz3)
mcList[i].x = (howElliptical * rx3 * per) - (howElliptical * 2)
mcList[i].y = ry3 * per
mcList[i].scale = per
var alpha = per
alpha = (alpha - 0.6) * (10 / 6)
mcList[i].alpha = alpha * alpha * alpha - 0.2
mcList[i].zIndex = Math.ceil(100 - Math.floor(mcList[i].cz))
// create texts
self.items = []
self.texts.forEach((text, index) => {
const item = self._createTextItem(text, index)
$el.appendChild(item.el)
self.items.push(item)
})
self.$container.appendChild($el)
self.$el = $el
}
doPosition()
}
function positionAll() {
var phi = 0
var theta = 0
var max = mcList.length
for (var i = 0; i < max; i++) {
if (distr) {
phi = Math.acos(-1 + (2 * (i + 1) - 1) / max)
theta = Math.sqrt(max * Math.PI) * phi
// create a text
_createTextItem(text, index = 0) {
const self = this
const itemEl = document.createElement('span')
itemEl.className = self.config.itemClass
if (self.config.useItemInlineStyles) {
itemEl.style.willChange = 'transform, opacity, filter'
itemEl.style.position = 'absolute'
itemEl.style.top = '50%'
itemEl.style.left = '50%'
itemEl.style.zIndex = index + 1
itemEl.style.filter = 'alpha(opacity=0)'
itemEl.style.opacity = 0
const transformOrigin = '50% 50%'
itemEl.style.WebkitTransformOrigin = transformOrigin
itemEl.style.MozTransformOrigin = transformOrigin
itemEl.style.OTransformOrigin = transformOrigin
itemEl.style.transformOrigin = transformOrigin
const transform = 'translate3d(-50%, -50%, 0) scale(1)'
itemEl.style.WebkitTransform = transform
itemEl.style.MozTransform = transform
itemEl.style.OTransform = transform
itemEl.style.transform = transform
}
if (self.config.useHTML) {
itemEl.innerHTML = text
} else {
phi = Math.random() * (Math.PI)
theta = Math.random() * (2 * Math.PI)
itemEl.innerText = text
}
// 坐标变换
mcList[i].cx = radius * Math.cos(theta) * Math.sin(phi)
mcList[i].cy = radius * Math.sin(theta) * Math.sin(phi)
mcList[i].cz = radius * Math.cos(phi)
return {
el: itemEl,
...self._computePosition(index) // distributed in appropriate place
}
}
aA[i].style.left = mcList[i].cx + oDiv.offsetWidth / 2 - mcList[i].offsetWidth / 2 + 'px'
aA[i].style.top = mcList[i].cy + oDiv.offsetHeight / 2 - mcList[i].offsetHeight / 2 + 'px'
// calculate appropriate place
_computePosition(index, random = false) {
const self = this
const textsLength = self.texts.length
// if random `true`, It means that a random appropriate place is generated, and the position will be independent of `index`
if (random) index = Math.floor(Math.random() * (textsLength + 1))
const phi = Math.acos(-1 + (2 * index + 1) / textsLength)
const theta = Math.sqrt((textsLength + 1) * Math.PI) * phi
return {
x: (self.size * Math.cos(theta) * Math.sin(phi)) / 2,
y: (self.size * Math.sin(theta) * Math.sin(phi)) / 2,
z: (self.size * Math.cos(phi)) / 2
}
}
}
function doPosition() {
var l = oDiv.offsetWidth / 2
var t = oDiv.offsetHeight / 2
for (var i = 0; i < mcList.length; i++) {
if (mcList[i].on) {
continue
_requestInterval(fn, delay) {
const requestAnimFrame = ((() => window.requestAnimationFrame) || ((callback, element) => {
window.setTimeout(callback, 1000 / 60)
}))()
let start = new Date().getTime()
const handle = {}
function loop() {
handle.value = requestAnimFrame(loop)
const current = new Date().getTime()
const delta = current - start
if (delta >= delay) {
fn.call()
start = new Date().getTime()
}
}
var aAs = aA[i].style
if (mcList[i].alpha > 0.1) {
if (aAs.display !== '') { aAs.display = '' }
} else {
if (aAs.display !== 'none') { aAs.display = 'none' }
continue
handle.value = requestAnimFrame(loop)
return handle
}
// init
_init() {
const self = this
self.active = false // whether the mouse is activated
self.mouseX0 = self.initSpeed * Math.sin(self.direction * (Math.PI / 180)) // init distance between the mouse and rolling center x axis
self.mouseY0 = -self.initSpeed * Math.cos(self.direction * (Math.PI / 180)) // init distance between the mouse and rolling center y axis
self.mouseX = self.mouseX0 // current distance between the mouse and rolling center x axis
self.mouseY = self.mouseY0 // current distance between the mouse and rolling center y axis
const isTouchDevice = window.matchMedia('(hover: hover)')
if (!isTouchDevice || isTouchDevice.matches) {
// mouseover
TagCloud._on(self.$el, 'mouseover', () => { self.active = true })
// mouseout
TagCloud._on(self.$el, 'mouseout', () => { self.active = false })
// mousemove
TagCloud._on(self.keep ? window : self.$el, 'mousemove', (ev) => {
ev = ev || window.event
const rect = self.$el.getBoundingClientRect()
self.mouseX = (ev.clientX - (rect.left + rect.width / 2)) / 5
self.mouseY = (ev.clientY - (rect.top + rect.height / 2)) / 5
})
}
aAs.left = mcList[i].cx + l - mcList[i].offsetWidth / 2 + 'px'
aAs.top = mcList[i].cy + t - mcList[i].offsetHeight / 2 + 'px'
// aAs.fontSize=Math.ceil(12*mcList[i].scale/2)+8+'px';
// aAs.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+100*mcList[i].alpha+")";
aAs.filter = 'alpha(opacity=' + 100 * mcList[i].alpha + ')'
aAs.zIndex = mcList[i].zIndex
aAs.opacity = mcList[i].alpha
// update state regularly
self._next() // init update state
self.interval = self._requestInterval(() => {
self._next.call(self)
}, 10)
}
// calculate the next state
_next() {
const self = this
if (self.paused) {
return
}
// if keep `false`, pause rolling after moving mouse out area
if (!self.keep && !self.active) {
self.mouseX = Math.abs(self.mouseX - self.mouseX0) < 1
? self.mouseX0 : (self.mouseX + self.mouseX0) / 2 // reset distance between the mouse and rolling center x axis
self.mouseY = Math.abs(self.mouseY - self.mouseY0) < 1
? self.mouseY0 : (self.mouseY + self.mouseY0) / 2 // reset distance between the mouse and rolling center y axis
}
let a = -(Math.min(Math.max(-self.mouseY, -self.size), self.size) / self.radius) *
self.maxSpeed
let b = (Math.min(Math.max(-self.mouseX, -self.size), self.size) / self.radius) *
self.maxSpeed
// inverse direction if enabled
if (self.config.reverseDirection) {
a = -a
b = -b
}
if (Math.abs(a) <= 0.01 && Math.abs(b) <= 0.01) return // pause
// calculate offset
const l = Math.PI / 180
const sc = [
Math.sin(a * l),
Math.cos(a * l),
Math.sin(b * l),
Math.cos(b * l)
]
self.items.forEach(item => {
const rx1 = item.x
const ry1 = item.y * sc[1] + item.z * (-sc[0])
const rz1 = item.y * sc[0] + item.z * sc[1]
const rx2 = rx1 * sc[3] + rz1 * sc[2]
const ry2 = ry1
const rz2 = rz1 * sc[3] - rx1 * sc[2]
const per = (2 * self.depth) / (2 * self.depth + rz2) // todo
item.x = rx2
item.y = ry2
item.z = rz2
item.scale = per.toFixed(3)
let alpha = per * per - 0.25
alpha = (alpha > 1 ? 1 : alpha).toFixed(3)
const itemEl = item.el
const left = (item.x - itemEl.offsetWidth / 2).toFixed(2)
const top = (item.y - itemEl.offsetHeight / 2).toFixed(2)
const transform = `translate3d(${left}px, ${top}px, 0) scale(${item.scale})`
itemEl.style.WebkitTransform = transform
itemEl.style.MozTransform = transform
itemEl.style.OTransform = transform
itemEl.style.transform = transform
itemEl.style.filter = `alpha(opacity=${100 * alpha})`
itemEl.style.opacity = alpha
})
}
/* export instance properties and methods */
// update
update(texts) {
const self = this
// params
self.texts = texts || []
// judging and processing items based on texts
self.texts.forEach((text, index) => {
let item = self.items[index]
if (!item) { // if not had, then create
item = self._createTextItem(text, index)
Object.assign(item, self._computePosition(index, true)) // random place
self.$el.appendChild(item.el)
self.items.push(item)
}
// if had, replace text
if (self.config.useHTML) {
item.el.innerHTML = text
} else {
item.el.innerText = text
}
})
// remove redundant self.items
const textsLength = self.texts.length
const itemsLength = self.items.length
if (textsLength < itemsLength) {
const removeList = self.items.splice(textsLength, itemsLength - textsLength)
removeList.forEach(item => {
self.$el.removeChild(item.el)
})
}
}
// destroy
destroy() {
const self = this
self.interval = null
// clear in TagCloud.list
const index = TagCloud.list.findIndex(e => e.el === self.$el)
if (index !== -1) TagCloud.list.splice(index, 1)
// clear element
if (self.$container && self.$el) {
self.$container.removeChild(self.$el)
}
}
pause() {
const self = this
self.paused = true
}
resume() {
const self = this
self.paused = false
}
}
function sineCosine(a, b, c) {
sa = Math.sin(a * dtr)
ca = Math.cos(a * dtr)
sb = Math.sin(b * dtr)
cb = Math.cos(b * dtr)
sc = Math.sin(c * dtr)
cc = Math.cos(c * dtr)
}
export default (els, texts, options) => {
if (typeof els === 'string') els = document.querySelectorAll(els)
if (!els.forEach) els = [els]
const instances = []
els.forEach(el => {
if (el) {
instances.push(new TagCloud(el, texts, options))
}
})
return instances.length <= 1 ? instances[0] : instances
}

12
src/assets/styles/font-some.css

@ -1,7 +1,7 @@
.chartNum{
display: flex;
justify-content: flex-start;
padding-left: .575rem;
padding-left: .425rem;
}
.box-items {
position: relative;
@ -11,6 +11,7 @@
}
/*滚动数字设置*/
.number-item {
position: relative;
display: flex;
justify-content: center;
text-align: center;
@ -18,7 +19,7 @@
height: .5rem;
line-height: .4rem;
}
.number-item span{
.number-item span.items-int{
position: relative;
display: inline-block;
width: 100%;
@ -27,7 +28,7 @@
text-orientation: upright;
overflow: hidden;
}
.number-item span i{
.number-item span.items-int i{
font-style: normal;
position: absolute;
top: 0;
@ -42,7 +43,4 @@
background-clip: text;
-webkit-text-fill-color: transparent; */
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
.number-item:last-child {
margin-right: 0;
}
}

98
src/assets/styles/index.scss

@ -353,7 +353,7 @@
display: block;
font-size: .175rem;
color: #CCDEFF;
padding-left: .125rem;
padding-left: .0625rem;
margin-top: .125rem;
}
}
@ -370,12 +370,12 @@
background: url('~@/assets/images/pageOne-1.png') no-repeat top left;
background-size: cover;
p{
padding-left: .575rem;
padding-left: .45rem;
}
}
&.lendingNum{
top: 3.3rem;
right: .3625rem;
right: 19px;
}
&.cardNum{
top: 1.1625rem;
@ -387,10 +387,10 @@
background-size: cover;
p{
text-align: right;
padding-right: .575rem;
padding-right: .45rem;
}
.middle-num{
padding-right: .575rem;
padding-right: .275rem;
justify-content: flex-end;
.chartNum{
justify-content: flex-end;
@ -766,50 +766,52 @@
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
}
.pageLeft-flop-box {
position: relative;
}
.pageLeft-flop-box {
position: relative;
height: .325rem;
margin-top: .125rem;
overflow: hidden;
& div:first-child {
height: .325rem;
margin-top: .125rem;
overflow: hidden;
& div:first-child {
height: .325rem;
overflow: hidden;
display: flex;
align-items: center;
justify-content: flex-start;
}
.flop-figure {
width: 26px;
i {
font-size: .3rem;
font-weight: bold;
}
}
.flop-comma {
margin-left: -0.025rem;
span {
left: 0;
font-size: .275rem;
color: #fff;
// background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// background: linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// -webkit-background-clip: text;
// background-clip: text;
// -webkit-text-fill-color: transparent;
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
}
& em{
font-style: normal;
font-size: .175rem;
display: flex;
align-items: center;
justify-content: flex-start;
}
.flop-figure {
width: 26px;
i {
font-size: .3rem;
font-weight: bold;
color: #A8CBF6;
height: .375rem;
}
}
.flop-item-name{
font-size: .225rem;
.flop-comma {
margin-left: -0.025rem;
span {
left: 0;
font-size: .275rem;
color: #fff;
// background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// background: linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// -webkit-background-clip: text;
// background-clip: text;
// -webkit-text-fill-color: transparent;
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
}
& em{
font-style: normal;
font-size: .175rem;
font-weight: bold;
color: #A8CBF6;
height: .375rem;
}
}
.flop-item-name{
font-size: .225rem;
}
// 左边进度条
@ -928,6 +930,11 @@
margin: 0 auto .3rem auto;
text-align: center;
line-height: 1.9rem;
overflow: hidden;
img{
display: block;
width: 100%;
}
}
span{
display: block;
@ -1524,6 +1531,11 @@
margin-right: .475rem;
text-align: center;
line-height: 1.35rem;
overflow: hidden;
img{
display: block;
width: 100%;
}
}
span{
display: block;

10
src/utils/request.js

@ -4,7 +4,7 @@ import axios from 'axios'
// 创建axios实例
const service = axios.create({
// baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/', // api 的 base_url
baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
// baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
timeout: 1000 * 30, // 请求超时时间
headers: {
'Content-Type': 'application/json'
@ -17,6 +17,14 @@ service.interceptors.request.use(
// if (getToken()) {
// config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
// }
switch (config.urlType) {
case 'local':
config.url = process.env.VUE_APP_BASE_API + config.url
break
case 'interlib':
config.url = process.env.VUE_APP_LIB_API + config.url
break
}
const token = '' // 登录后生成用于识别用户身份,项目不需要直接去掉
config.headers['Authorization'] = token || ''
return config

207
src/views/index.vue

@ -4,15 +4,22 @@
<dv-loading>Loading...</dv-loading>
</div>
<Header :header-title="headerTitle" />
<div class="header-page" @click="goToNextPage">{{ (currentPage+1) +' / '+ pageData.length }}</div>
<section ref="sectionRef">
<keep-alive>
<PageOne v-if="currentPage === 0" ref="user" />
<div class="header-page">{{ (currentIndex+1) +' / '+ pageData.length }}</div>
<keep-alive>
<PageOne v-if="currentIndex === 0" ref="pageOneRefs" />
</keep-alive>
<PageTwo v-if="currentIndex === 1" />
<PageThree v-if="currentIndex=== 2" />
<PageFour v-if="currentIndex === 3" />
<!-- <section>
<keep-alive v-if="shouldCacheComponent">
<component :is="currentPage && currentPage.title === 'PageOne' ? 'PageOne' : null" />
</keep-alive>
<Map v-if="currentPage === 1" />
<PageThree v-if="currentPage === 2" />
<PageFour v-if="currentPage === 3" />
</section>
<component :is="currentPageComponent" v-else />
</section> -->
<!-- <component :is="currentPage && currentPage.title" /> -->
<div class="bottom-bg">
<div class="bottom-content">
<div class="dot-container left-dots">
@ -31,9 +38,10 @@
</template>
<script>
import { FetchInitToken, FetchInitSetting } from '@/api/library'
import Header from '@/views/header/index.vue'
import PageOne from '@/views/pageOne/index.vue'
import Map from '@/views/map/index.vue'
import PageTwo from '@/views/map/index.vue'
import PageThree from '@/views/pageThree/index.vue'
import PageFour from '@/views/pageFour/index.vue'
export default {
@ -41,29 +49,22 @@ export default {
components: {
Header,
PageOne,
Map,
PageTwo,
PageThree,
PageFour
},
data() {
return {
currentPage: 0,
currentIndex: 2, //
currentPage: null, //
isLoading: false,
height: '',
headerTitle: '祁阳陶铸图书馆智慧大屏馆情数据总览',
pageData: [
{
id: 1, title: 'page1', delayed: 10
},
{
id: 2, title: 'page2', delayed: 0
},
{
id: 3, title: 'page3', delayed: 10
},
{
id: 4, title: 'page4', delayed: 0
}
{ id: 1, title: 'PageOne', delayed: 10, isShow: false },
{ id: 2, title: 'PageTwo', delayed: 10, isShow: false },
{ id: 3, title: 'PageThree', delayed: 10, isShow: false },
{ id: 4, title: 'PageFour', delayed: 10, isShow: false }
],
swiperOption: null,
loadingTtimer: null,
@ -73,38 +74,106 @@ export default {
deviceTimer: null,
todayTimer: null,
yearTimer: null,
intervalId: null // ID
intervalId: null,
orderIds: []
}
},
computed: {
shouldCacheComponent() {
return this.currentPage && this.currentPage.title === 'PageOne'
},
currentPageComponent() {
if (this.currentPage && this.currentPage.title === 'PageTwo') {
return 'PageTwo'
} else if (this.currentPage && this.currentPage.title === 'PageThree') {
return 'PageThree'
} else if (this.currentPage && this.currentPage.title === 'PageFour') {
return 'PageFour'
}
return null
}
},
created() {
// this.getToken()
// const METAWA = require('../assets/js/META.common.min.js')
// const meta = new METAWA('665e845538d68')
// meta.callback = (r) => {
// console.log(r, '')
// }
this.startAutoSwitch()
// this.getInitSetting()
},
beforeDestroy() {
clearInterval(this.timer2)
this.stopAutoSwitch()
// window.removeEventListener('resize', this.setElementHeight)
clearInterval(this.timer2)
clearInterval(this.leftTimer)
clearInterval(this.middleTimer)
clearInterval(this.deviceTimer)
clearInterval(this.todayTimer)
clearInterval(this.yearTimer)
this.middleTimer = null
this.leftTimer = null
this.deviceTimer = null
this.todayTimer = null
this.yearTimer = null
},
mounted() {
this.showLoading()
// this.setElementHeight()
// window.addEventListener('resize', this.setElementHeight)
this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer2)
// window.removeEventListener('resize', this.setElementHeight)
})
},
methods: {
startAutoSwitch() {
getToken() {
const params = {
'appid': 'whfeitian',
'secret': '1f4unqcgg9j0pvx54cwvillch5xto9e5'
}
FetchInitToken(params).then(res => {
console.log(res)
})
},
startPageSwitch() {
const delay = parseInt(this.pageData[this.currentIndex].delayed) * 1000
this.intervalId = setInterval(() => {
this.currentPage = (this.currentPage + 1) % 4
}, 20000)
this.currentIndex++
if (this.currentIndex >= this.pageData.length) {
this.currentIndex = 0
}
const index = this.currentIndex % this.pageData.length
this.currentPage = this.pageData[index]
}, delay)
},
getInitSetting() {
// selectorder 1 2
// show1
// show2
FetchInitSetting().then(res => {
const result = JSON.parse(res.data)
console.log(result)
const selectorder = result.selectorder
const showDurations = { 1: result.show1, 2: result.show2, 3: result.show3, 4: result.show4 }
this.orderIds = selectorder.split(',').map(id => parseInt(id.trim()))
const updatedPageData = this.orderIds.map((id, index) => {
const pageIndex = this.pageData.findIndex(item => item.id === id)
if (pageIndex !== -1) {
const updatedPage = {
...this.pageData[pageIndex],
isShow: true,
delayed: showDurations[id]
}
return updatedPage
} else {
console.warn(`ID 为 ${id} 的页面未找到。`)
return null
}
}).filter(item => item !== null) //
this.pageData = updatedPageData
if (this.pageData) {
this.currentPage = this.pageData[this.currentIndex]
this.startPageSwitch()
}
})
},
stopAutoSwitch() {
clearInterval(this.intervalId)
@ -113,69 +182,11 @@ export default {
this.currentPage = (this.currentPage + 1) % 4
this.stopAutoSwitch() //
if (this.currentPageIndex === 3) {
this.autoplayVideo = false //
} else {
this.autoplayVideo = true //
}
//
// setTimeout(() => {
// this.startAutoSwitch()
// }, 200000)
},
autoPagination(page) {
// this.currentPage = page
console.log('page:', page)
if (page > this.pageData.length) {
page = 1
}
this.currentPage = page
console.log('当前页:', this.currentPage)
// if (this.currentPage === 1 || this.currentPage === 3) {
// clearInterval(this.timer2)
// this.timer2 = setInterval(() => {
// setTimeout(() => {
// this.autoPagination(this.currentPage + 1)
// }, 0)
// }, 8000)
// }
// if (this.currentPage >= this.pageData.length) {
// this.currentPage = 1
// } else {
// this.currentPage = active + 1
// }
// console.log('changePage', this.active)
// if (this.currentPage < this.pageData.length) {
// if (this.currentPage === 1 || this.currentPage === 3) {
// clearInterval(this.timer2)
// this.timer2 = setInterval(() => {
// setTimeout(() => {
// this.active = this.currentPage + 1
// }, 0)
// }, 10000)
// } else {
// this.active = this.currentPage + 1
// }
// } else {
// this.active = 1
// }
this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer2)
clearInterval(this.leftTimer)
clearInterval(this.middleTimer)
clearInterval(this.deviceTimer)
clearInterval(this.todayTimer)
clearInterval(this.yearTimer)
this.middleTimer = null
this.leftTimer = null
this.deviceTimer = null
this.todayTimer = null
this.yearTimer = null
})
},
showLoading() {
this.isLoading = true
this.loadingTtimer = setTimeout(() => {
@ -183,14 +194,6 @@ export default {
window.clearTimeout(this.loadingTtimer)
}, 1500)
},
// DOM
setElementHeight() {
clearTimeout(this.loadingTtimer)
this.loadingTtimer = setTimeout(() => {
this.showLoading()
this.height = `${(this.$refs.sectionRef.offsetHeight - 30) / 3}px`
}, 100)
},
// 3
formatter(str) {
const reg = /(?=(?!\b)(\d{3})+$)/g
@ -207,7 +210,7 @@ export default {
})
setTimeout(() => {
numberItems.forEach((ls, index) => {
ls.style.transition = 'transform 0.8s ease-in-out'
ls.style.transition = 'transform 1s ease-in-out'
ls.style.transform = `translateY(-${numberArr[index] * 10}%)`
})
}, 15)

316
src/views/map/index.vue

@ -18,14 +18,14 @@
<img src="@/assets/images/map_18.png" alt="">
<p>
<span>藏书量</span>
<span>4787<i></i></span>
<span>{{ libCurrent && libCurrent.GCL }}<i></i></span>
</p>
</li>
<li>
<img src="@/assets/images/map_20.png" alt="">
<p>
<span>办证量</span>
<span>74<i></i></span>
<span>{{ libCurrent && libCurrent.readerIdNum }}<i></i></span>
</p>
</li>
</ul>
@ -34,12 +34,12 @@
<img src="@/assets/images/map_28.png" alt="">
<p>
<span>占地面积</span>
<span>45<i>平方米</i></span>
<span>{{ libCurrent && libCurrent.occupationArea }}<i>平方米</i></span>
</p>
</li>
</ul>
<div class="scroll-container">
<div ref="marquee" class="lib-text" :style="{ top: position + 'px' }">关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通</div>
<div ref="marquee" class="lib-text" :style="{ top: position + 'px' }">{{ libCurrent && libCurrent.explain }}</div>
</div>
</div>
</div>
@ -52,25 +52,25 @@
<div class="database-title">读者统计</div>
<div class="online">
<p>累计办证人数</p>
<p class="num"><span>156</span><i></i></p>
<p class="num"><span>{{ cardTotal }}</span><i></i></p>
</div>
<div class="lending-ranking">
<h5>借阅Top10</h5>
<div class="ranking-cont">
<ul class="ranking-title">
<li style="width: 0.8rem;">排名</li>
<li style="width: 1.5rem; text-align: left; padding-left: 0.25rem;">姓名</li>
<li style="width: 1.25rem; text-align: left; ">姓名</li>
<li style="flex:1;" />
<li style="width: 1.75rem; text-align: right; padding-right: .375rem;">借阅次数</li>
<li style="width: 1.75rem; text-align: right; padding-right: .25rem;">借阅次数</li>
</ul>
<ul class="ranking-list">
<li v-for="(item,index) in rankingWithPercentage" :key="index" :class="{ 'hovered': index === currentHover }">
<div style="width: 1rem; color: #79B8FF;" :class="[{'ranking-num1':index===0},{'ranking-num2':index===1},{'ranking-num3':index===2}]">{{ index>=3 ? index+1 : null }}</div>
<div style="width: 1.5rem; text-align: left; padding-left: .25rem;">{{ item.name }}</div>
<div style="width: 1.25rem; text-align: left; ">{{ item.RDNAME }}</div>
<div class="ranking-progress" style="flex:1; align-self: center;">
<el-progress :percentage="item.percentage" :stroke-width="8" :show-text="false" color="#009afb" />
</div>
<div style="width: 1.75rem; text-align: right; padding-right: .375rem;">{{ item.num }}<i></i></div>
<div style="width: 1.75rem; text-align: right; padding-right: .25rem;">{{ item.TOTALNUM }}<i></i></div>
</li>
</ul>
</div>
@ -81,9 +81,10 @@
</template>
<script>
import { FetchLibBookTotal, FetchLibcodeDetails, FetchReadRanking, FetchLendingTotal } from '@/api/library'
import mapJson from '@/assets/json/qy.json'
import libJson from '@/assets/json/lib2.json'
import libJsonData from '@/assets/json/lib.json'
// import libJsonData from '@/assets/json/lib.json'
import { debounce } from 'lodash' // js,
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
@ -100,50 +101,19 @@ export default {
defaultImg: 'this.src="' + require('@/assets/images/default-img.png') + '"',
count: 0,
len: 0, // count % len [0, len-1]
headerTitle: '祁阳图书馆',
libALLNum: [],
libInfoData: [],
libImg: [
{
'id': 1,
'cover': require('../../assets/images/lib.jpg')
},
{
'id': 2,
'cover': require('../../assets/images/lib2.jpg')
},
{
'id': 3,
'cover': require('../../assets/images/lib3.jpg')
},
{
'id': 4,
'cover': require('../../assets/images/lib4.jpg')
},
{
'id': 5,
'cover': require('../../assets/images/lib5.jpg')
}
],
libIndex: 0,
libCurrent: null,
swiperKey: 1,
currentIndex: 0,
displayedImages: [],
libImg: [],
swiperOption: null,
seriesData: [],
mapImg: require('../../assets/images/map-bg2.png'),
rankingData: [
{ id: 1, num: 718, name: '胡图图' },
{ id: 2, num: 447, name: '张三三' },
{ id: 3, num: 261, name: '李晓明' },
{ id: 4, num: 242, name: '胡图图' },
{ id: 5, num: 165, name: '胡图图' },
{ id: 6, num: 140, name: '胡图图' },
{ id: 7, num: 120, name: '胡图图' },
{ id: 8, num: 100, name: '胡图图' },
{ id: 9, num: 70, name: '胡1' },
{ id: 10, num: 60, name: '胡图图' }
],
cardTotal: 0,
rankingData: [],
rankingWithPercentage: [],
timer: null,
position: 0,
@ -161,41 +131,14 @@ export default {
this.stopScrolling()
},
created() {
this.libInfoData = libJsonData
this.getLibBookTotal()
this.getReadRanking()
this.getLendingTotal()
},
mounted() {
if (localStorage.getItem('countItem')) {
this.count = parseInt(localStorage.getItem('countItem'))
} else {
this.count = 0
}
this.initChart() //
setTimeout(() => {
this.updateChart() //
window.addEventListener('resize', debounce(this.resize, 2000)) // 使
}, 300)
this.rankingDataComputed()
if (document.getElementsByClassName('scroll-container')[0]) {
this.startScrolling()
}
setInterval(() => {
this.currentHover = (this.currentHover + 1) % this.rankingData.length
}, 1000)
},
methods: {
escapeHtml(str) {
var arrEntities = {
'lt': '<',
'gt': '>',
'nbsp': ' ',
'amp': '&',
'quot': '"'
}
return str.replace(/&(lt|gt|nbsp|amp|quot|pre);/ig, function(all, t) {
return arrEntities[t]
})
},
startScrolling() {
this.timer = setInterval(() => {
this.position -= this.speed
@ -212,31 +155,163 @@ export default {
stopScrolling() {
if (this.timer) {
clearInterval(this.timer)
console.log('离开页面 this.libIndex', this.libIndex)
console.log('离开页面 this.libCurrent', this.libCurrent)
console.log('离开页面 this.count', this.count)
localStorage.setItem('libIndexItem', this.libIndex)
localStorage.setItem('libCurrentItem', this.libCurrent)
localStorage.setItem('countItem', this.count)
}
},
getReadRanking() {
const params = {
'libcode': 'QYTSG',
'starttime': '2000-01-01',
'endtime': '2034-01-01',
'rownum': 10
}
FetchReadRanking(params).then(res => {
const result = JSON.parse(res.data)
console.log(result.resultlist)
if (result.success && result.resultlist.length > 0) {
this.rankingData = result.resultlist
this.rankingDataComputed()
setInterval(() => {
this.currentHover = (this.currentHover + 1) % this.rankingData.length
}, 1000)
} else {
throw new Error('Failed' + libcode)
}
}).catch(error => {
console.error('Error', error)
return null
})
},
rankingDataComputed() {
const firstPlaceNum = this.rankingData[0].num
const firstPlaceNum = this.rankingData[0].TOTALNUM
this.rankingWithPercentage = this.rankingData.map(item => {
if (item.name.length === 2) {
if (item.RDNAME.length === 2) {
// name
item.name = item.name.substring(0, 1) + ' * '
} else if (item.name.length === 3) {
item.RDNAME = item.RDNAME.substring(0, 1) + ' * '
} else if (item.RDNAME.length === 3) {
//
item.name = item.name.substring(0, 1) + ' * ' + item.name.substring(2, 3)
item.RDNAME = item.RDNAME.substring(0, 1) + ' * ' + item.RDNAME.substring(2, 3)
} else if (item.name.length > 3) {
// 4
item.name = item.name.substring(0, 1) + ' * ' + ' * ' + item.name.substring(3, item.name.length)
item.RDNAME = item.RDNAME.substring(0, 1) + ' * ' + ' * ' + item.RDNAME.substring(3, item.name.length)
}
const percentage = (item.num / firstPlaceNum) * 100
const percentage = (item.TOTALNUM / firstPlaceNum) * 100
return { ...item, percentage }
})
},
//
getLendingTotal() {
FetchLendingTotal().then(res => {
const result = JSON.parse(res.data)
if (result.success & result.resultlist.length !== 0) {
this.cardTotal = result.resultlist.filter(item => item.LIBCODE !== '999').reduce((acc, obj) => acc + obj.BZL_YEAR, 0)
} else {
this.cardTotal = 0
}
}).catch(error => {
console.error('Error', error)
})
},
//
getLibBookTotal() {
const params = {
'libcode': 'LSJDFG,LJPFG,DCDFG,QYTSG,SJLFG,XMDFG,FXLFG,QLQFG,SEDSG,MZZFG,GYTZFG,KJSKCFG,JBTZFG,SKTZFG,XJZFG,PSZFG,DZQZFG,WXJDFG,CHJDFG,BSZFG,BZHFG',
'starttime': '2000-01-01',
'endtime': '2034-01-01'
}
FetchLibBookTotal(params).then(res => {
const result = JSON.parse(res.data)
console.log(result.resultlist)
if (result.success & result.resultlist.length !== 0) {
this.libALLNum = result.resultlist
} else {
this.libALLNum = []
}
this.getLibcodeDetails()
}).catch(error => {
console.error('Error', error)
this.libALLNum = []
this.getLibcodeDetails()
})
},
//
getLibcodeDetails() {
FetchLibcodeDetails().then(res => {
const result = JSON.parse(res.data)
if (result.length !== 0) {
const libCode = {
'QYTSG': [111.848657, 26.588519],
'LSJDFG': [111.86478, 26.599231],
'LJPFG': [111.823424, 26.693962],
'DCDFG': [111.77655, 26.663866],
'SJLFG': [111.856979, 26.59469],
'XMDFG': [111.895584, 26.611702],
'FXLFG': [111.843102, 26.57896],
'QLQFG': [111.902703, 26.571593],
'SEDSG': [111.842537, 26.58196],
'MZZFG': [111.796508, 26.510589],
'GYTZFG': [111.897118, 26.48444],
'KJSKCFG': [111.851548, 26.550191],
'JBTZFG': [112.085297, 26.436849],
'SKTZFG': [111.819018, 26.412155],
'XJZFG': [112.009764, 26.355137],
'PSZFG': [112.051186, 26.489878],
'DZQZFG': [111.873254, 26.369761],
'WXJDFG': [111.855175, 26.574414],
'CHJDFG': [111.850902, 26.586461],
'BSZFG': [111.989802, 26.421353],
'BZHFG': [111.862001, 26.580311]
}
const updatedLibraries = result.map(library => {
const matchingData = this.libALLNum.find(item => item.LIBCODE === library.tcId)
if (matchingData) {
return {
...library,
GCL: matchingData.GCL,
sort: Object.keys(libCode).indexOf(library.tcId) + 1,
coordinate: libCode[library.tcId]
}
} else {
return {
...library,
GCL: 0,
sort: Object.keys(libCode).indexOf(library.tcId) + 1,
coordinate: libCode[library.tcId]
}
}
}).sort((a, b) => a.sort - b.sort)
this.libInfoData = updatedLibraries
console.log(updatedLibraries)
if (localStorage.getItem('countItem')) {
this.count = parseInt(localStorage.getItem('countItem'))
} else {
this.count = 0
}
this.initChart() //
setTimeout(() => {
this.updateChart() //
window.addEventListener('resize', debounce(this.resize, 2000)) // 使
}, 300)
if (document.getElementsByClassName('scroll-container')[0]) {
this.startScrolling()
}
} else {
this.libInfoData = []
}
}).catch(error => {
console.error('Error', error)
})
},
initChart() {
this.$echarts.registerMap('qiyang', mapJson) // map
this.myChart = this.$echarts.init(this.$refs.chart) // echarts
@ -245,29 +320,12 @@ export default {
mapImg.style.height = mapImg.height = mapImg.width = mapImg.style.width = '1px'
mapImg.src = require('../../assets/images/map-bg2.png')
var XAData = [
[{ name: '陶铸图书馆' }, { name: '陶铸图书馆', value: '陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸' }],
[{ name: '陶铸图书馆' }, { name: '龙山街道分馆', value: '龙山街道龙山街道龙山街道龙山街道龙山街道龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '黎家坪分馆', value: '龙山街道龙山街道龙山街道龙山街道龙山街道龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '大村甸分馆', value: '龙山街道龙山街道龙山街道龙山街道龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '邵家岭自助馆', value: '邵家岭' }],
[{ name: '陶铸图书馆' }, { name: '下马渡分馆', value: '下马渡' }],
[{ name: '陶铸图书馆' }, { name: '复兴路自助馆', value: '复兴路' }],
[{ name: '陶铸图书馆' }, { name: '七里桥分馆', value: '七里桥' }],
[{ name: '陶铸图书馆' }, { name: '少儿馆', value: '少儿馆' }],
[{ name: '陶铸图书馆' }, { name: '茅竹镇分馆', value: '祁阳县茅竹镇' }],
[{ name: '陶铸图书馆' }, { name: '观音滩镇分馆', value: '观音滩镇' }],
[{ name: '陶铸图书馆' }, { name: '凯俊盛科城分馆', value: '凯俊盛科城' }],
[{ name: '陶铸图书馆' }, { name: '进宝塘镇分馆', value: '进宝塘镇' }],
[{ name: '陶铸图书馆' }, { name: '三口塘镇分馆', value: '三口塘镇' }],
[{ name: '陶铸图书馆' }, { name: '肖家镇分馆', value: '肖家镇' }],
[{ name: '陶铸图书馆' }, { name: '潘市镇分馆', value: '潘市镇' }],
[{ name: '陶铸图书馆' }, { name: '大忠桥镇分馆', value: '大忠桥镇' }],
[{ name: '陶铸图书馆' }, { name: '浯溪街道分馆', value: '浯溪街道' }],
[{ name: '陶铸图书馆' }, { name: '长虹街道分馆', value: '长虹街道' }],
[{ name: '陶铸图书馆' }, { name: '白水镇分馆', value: '白水镇' }],
[{ name: '陶铸图书馆' }, { name: '白竹湖自助馆', value: '白竹湖' }]
]
var XAData = this.libInfoData.map(item => {
return [
{ name: '陶铸图书馆' },
{ name: item.name, value: item.address }
]
})
var convertData = function(data) {
var res = []
for (var i = 0; i < data.length; i++) {
@ -396,20 +454,16 @@ export default {
padding: [0, 0, 0, 0],
backgroundColor: null,
position: function(point, params, dom, rect, size) {
// console.log('point', point)
// console.log('params', params)
// console.log('dom', dom)
// console.log('rect', rect)
// console.log('size', size)
return [point[0] + 14, point[1] - 164]
},
formatter: (params, ticket, callback) => {
if (params.seriesType === 'effectScatter') {
const addressLine = params.data.place ? `<div class='place'>地址:${params.data.place}</div>` : ''
return `<div class='tooltip-main' >
<div class='tooltip-line'></div>
<div class='tooltip-content'>
<div class='title'>${params.data.name}</div>
<div class='place'>地址${params.data.place}</div>
${addressLine}
</div>
</div>`
} else if (params.seriesType === 'lines') {
@ -668,8 +722,8 @@ export default {
// this.myChart.setOption(updateOption)
this.libIndex = this.count % this.len
this.libCurrent = this.libInfoData[this.libIndex]
console.log('this.libIndex', this.count)
console.log('this.libCurrent', this.libCurrent)
console.log('this.libIndex', this.libIndex)
console.log('this.libCurrent22', this.libCurrent)
this.initSwiper()
this.updatePageWithData()
this.autohover()
@ -722,24 +776,30 @@ export default {
this.myChart.resize()
},
updatePageWithData() {
//
const displayCountOptions = [1, 2, 3, 5]
const displayCount = displayCountOptions[Math.floor(Math.random() * displayCountOptions.length)]
// libImg
const shuffledLibImg = this.libImg.slice().sort(() => Math.random() - 0.5) //
this.displayedImages = shuffledLibImg.slice(0, displayCount)
this.currentIndex = 20
const linkSrc = process.env.VUE_APP_BASE_API
this.displayedImages = this.libCurrent.resouce.map((item, index) => {
if (item.filePath) {
item.cover = linkSrc + '/downloadFile' + item.filePath
} else {
// http://8.130.135.212:19000/MarcByIsbn?sIsbn=9787545559804
// axios.get('http://8.130.135.212:19000/MarcByIsbn?sIsbn=' + item.isbn)
// .then(response => {
// console.log(response)
// })
// .catch(error => {
// console.error('There was an error!', error)
// })
}
return item
})
console.log('displayedImages', this.displayedImages)
this.currentIndex = 0
this.swiperKey += 1
if (this.displayedImages.length === 1) {
setTimeout(() => {
this.count++
this.libIndex = this.count % this.len
this.libCurrent = this.libInfoData[this.libIndex]
console.log('updatePageWithData-libIndex', this.libIndex)
console.log('updatePageWithData-libCurrent', this.libCurrent)
this.updatePageWithData()
this.autohover()
}, 5000)

648
src/views/pageOne/data.json

@ -1,648 +0,0 @@
[
{
"nbId": "2c9680978e7f2e4f018ea185d9ba0022",
"libcode": "1201",
"nbName": "海错图笔记",
"nbExplain": "这本书是一套多元解读清代海洋生物图谱《海错图》的科普书,以博物达人的视角,从生物学,博物学及生活美学等角度,讲述中国丰富的海洋及滨海生物,植物和风土人情。孩子读了这本书,可谓是一次酣畅痛快的海洋及滨海生物物种解密,更是一次精彩的古今博物达人思维碰撞。",
"createTime": "2024-04-03T01:14:47.610+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:14:47.610+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "张辰亮著",
"nbBooktype": "图书",
"sortmark": "Q178.53/12",
"isbn": "978-7-5217-2277-2",
"nbPublisher": " 中信出版集团股份有限公司",
"nbPublisherdate": "2020",
"nbRecno": "12"
},
{
"nbId": "2c9680978a8dea18018c231b555f18ae",
"libcode": "1201",
"nbName": "费曼经典",
"nbExplain": "本书是著名物理学家理查德·费曼最负盛名的自述回忆录合集, 这些文章大致按时间顺序分为8个部分, 展现费曼的精彩一生: 从法洛克威小镇的好奇少年到麻省理工新生, 在普林斯顿大学那些年, 与爱妻阿琳的恋情, 与曼哈顿计划和原子弹, 任教康奈尔大学和加州理工学院, 到巴西感受拉美风情, 到华盛顿调查航天飞机事故……费曼以坦率的口吻讲述了他的所有冒险。作为费曼的好友, 编者拉尔夫·莱顿为本书增加了注释, 这些着意补充的细节为费曼的叙述增添了别样的色彩; 同时收录包括费曼的照片、绘画作品、手稿在内的的30多张图片。此外, 本书还特别收录著名物理学家、数学家弗里曼·戴森所作的前言, 并以知名演员、导演艾伦·艾尔达在加州理工学院毕业庆典上的演讲作为后记, 为这本精彩的自述辅以他人视角, 更能让读者看见一个完整的、活生生的费曼。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:13:22.543+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": " (美) 理查德·P. 费曼著 , (美) 拉尔夫·莱顿编",
"nbBooktype": "图书",
"sortmark": "K837.126.11/4",
"isbn": "978-7-5596-6127-2",
"nbPublisher": " 北京联合出版公司",
"nbPublisherdate": "2022",
"nbRecno": "69"
},
{
"nbId": "2c9680978a8dea18018c23197f6f18ad",
"libcode": "1201",
"nbName": "杰克之书",
"nbExplain": "本书讲述了杰克·凯鲁亚克的故事,全书共分六章,内容包括:小镇、城市、路、重访城市、大瑟尔、阴郁的书式电影。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:13:14.273+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(美)巴里·吉福德(Barry, Gifford),(美)劳伦斯·李(Lawrence, Lee)著",
"nbBooktype": "图书",
"sortmark": "K837.125/33",
"isbn": "978-7-305-25073-6",
"nbPublisher": "南京大学出版社",
"nbPublisherdate": "2022",
"nbRecno": "70"
},
{
"nbId": "2c9680978a8dea18018c231858d818ac",
"libcode": "1201",
"nbName": "一百年, 许多人, 许多事 ",
"nbExplain": "本书内容包括: 家族旧事、中西十年、从联大到中大 (上下) 四章。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:13:05.490+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "杨苡口述 , 余斌撰写",
"nbBooktype": "图书",
"sortmark": "K825.6/332",
"isbn": "978-7-5447-9274-5 ",
"nbPublisher": "译林出版社",
"nbPublisherdate": "2023",
"nbRecno": "71"
},
{
"nbId": "2c9680978a8dea18018c2316895518ab",
"libcode": "1201",
"nbName": "漫威先生",
"nbExplain": "本书从斯坦李在罗马尼亚的家族讲起,一直延伸到他在洛杉矶的临终时刻。本书既忠实地记录了斯坦·李戏剧性的成功,也记录了他人生中悲剧性的失败。本书作者亚伯拉罕·里斯曼进行了150多次采访,查阅了数千页私人文件,发掘出斯坦·李从未公开过的工作和生活信息。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:56.080+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(美)亚伯拉罕·里斯曼(Abraham Riesman)著",
"nbBooktype": "图书",
"sortmark": "K837.125.78=6/5",
"isbn": "978-7-5001-6919-2",
"nbPublisher": " 中译出版社",
"nbPublisherdate": "2022",
"nbRecno": "72"
},
{
"nbId": "2c9680978a8dea18018c2315547818aa",
"libcode": "1201",
"nbName": "如何屠龙",
"nbExplain": "本书内容: 出生在小村庄的你突然被选中去屠龙, 这让你不知所措? 别担心, 这本“传说级”秘籍会手把手教你通关真实的中世纪! 你需要选择适合战斗的装备、学点儿防身的技巧, 再找到一位适合你的导师。你得学会在冒险途中解决自己的食宿问题, 但还得时刻提防狡猾的骗子和凶狠的强盗。你可以在酒馆里和看不惯的家伙打一架, 但记得别和迷人的酒馆女招待走得太近。你必须在漫长的寒冬中活下来, 但也要在火灾发生时伸出援手。你应该看得懂敌军来袭时烽火台上的信号, 也该清楚凯旋后如何招待来为你庆贺的热情宾客。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:48.097+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "史蒂文森",
"nbBooktype": "图书",
"sortmark": "K109/179",
"isbn": "978-7-5596-6868-4",
"nbPublisher": " 北京联合出版公司",
"nbPublisherdate": "2023",
"nbRecno": "73"
},
{
"nbId": "2c9680978a8dea18018c23121a1b18a9",
"libcode": "1201",
"nbName": "我的艺术生活",
"nbExplain": "本书内容包括“艺术的童年时代”、“艺术的青少年时代”、“艺术的成年时期”三个部分,记述了作者从童年到成年所经历的生活和艺术的发展历程。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:39.867+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(苏联)斯坦尼斯拉夫斯基著 , 瞿白音译",
"nbBooktype": "图书",
"sortmark": "K835.12/40",
"isbn": "978-7-5327-9119-4",
"nbPublisher": "上海译文出版社",
"nbPublisherdate": "2022",
"nbRecno": "74"
},
{
"nbId": "2c9680978a8dea18018c2310292f18a8",
"libcode": "1201",
"nbName": "稻盛和夫如是说",
"nbExplain": "本书收录了整整半个世纪内,即从20世纪70年代开始至21世纪10年代为止,对稻盛合夫先生的采访,以及他的独白记述。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:30.210+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(日)稻盛和夫口述 , 曹岫云,张凯译",
"nbBooktype": "图书",
"sortmark": "K833.13/28",
"isbn": "978-7-111-70571-0",
"nbPublisher": "机械工业出版社",
"nbPublisherdate": "2022",
"nbRecno": "75"
},
{
"nbId": "2c9680978a8dea18018c230de31218a7",
"libcode": "1201",
"nbName": "布匿战争",
"nbExplain": "公元前3世纪, 罗马和迦太基展开了对两国之间的战略要地--西西里岛的争夺, 布匿战争的序幕由此拉开。在接下来的百余年里, 双方把战场扩大到了非洲、西班牙、意大利, 展开了改变古代地中海地区政治格局的三场宏大战争。许多军事史的经典篇章在此期间诞生--从汉尼拔率领十万大军翻越阿尔卑斯山、通过坎尼一役把罗马推到毁灭的边缘, 再到西庇阿在扎马之战大挫汉尼拔……布匿战争最后以迦太基屹立了三百多年的帝国在公元前146年的覆灭告终。布匿战争是西方历史的转折点, 如果罗马战败, 那么罗马帝国在接下来的两千年里对欧洲乃至整个世界造成的政治、语言、法律等方面的影响可能会小得多, 甚至罗马帝国可能根本不会出现。《布匿战争》兼具可读性和学术严谨性, 生动地呈现了这场战争, 也讨论了它深远的影响。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:22.193+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(英) 阿德里安·戈兹沃西著 , 李小迟译",
"nbBooktype": "图书",
"sortmark": "K126/31",
"isbn": "978-7-5570-2623-3 ",
"nbPublisher": " 广东旅游出版社",
"nbPublisherdate": "2022",
"nbRecno": "76"
},
{
"nbId": "2c9680978a8dea18018c230b113118a6",
"libcode": "1201",
"nbName": "好手艺",
"nbExplain": "\t本书集合了多部清朝时期中国广州一带画师所绘的外销画册,结合大量传世文献收录、介绍了农耕、造纸、制茶及贸易、纺织、制漆、瓷器制造及贸易、玻璃制作等与生活息息相关,且富有中国特色的传统手工艺制作流程,展示了当时中国社会生活与匠人精神,从侧面探寻了这股奔涌的“中国潮”,在文化生活与哲学思想方面,是如何影响席卷西方世界的。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:14.153+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "侯印国著",
"nbBooktype": "图书",
"sortmark": "J52/4",
"isbn": "978-7-5168-3295-0 ",
"nbPublisher": " 台海出版社",
"nbPublisherdate": "2022",
"nbRecno": "77"
},
{
"nbId": "2c9680978a8dea18018c2309c9fb18a5",
"libcode": "1201",
"nbName": "最后的礼物",
"nbExplain": "本书延续了移民主题, 但与前几部小说不同的是, 它聚焦于移民经历对移民自己及其后代的影响。主人公是63岁的非洲裔英国工程师阿巴斯, 43年前, 他从桑给巴尔来到英国, 认识了混血妻子马莉亚姆。多年来, 阿巴斯对自己到英国前的经历一直守口如瓶。小说开场时, 阿巴斯因糖尿病引发中风, 担心自己不久于人世, 把自己的秘密作为“最后的礼物”以碎片式的回忆方式告诉了家人。作为在英国长大的移民后代, 儿子贾马尔因自己的肤色难以被英国社会完全接受, 找不到归属感; 女儿汉娜 (Hanna) 把自己的名字改为安娜 (Anna), 在各方面努力把自己改造成一个英国人, 但其白人男友尼克的家人和亲友依然自恃种族优越, 对其冷嘲热讽, 羞辱责难。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:12:06.730+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(英) 阿卜杜勒拉扎克·古尔纳著 , 宋佥译",
"nbBooktype": "图书",
"sortmark": "I561.45/970",
"isbn": "978-7-5327-9088-3 ",
"nbPublisher": "上海译文出版社",
"nbPublisherdate": "2022",
"nbRecno": "78"
},
{
"nbId": "2c9680978a8dea18018c2308c09218a4",
"libcode": "1201",
"nbName": "里山异兽谭",
"nbExplain": "本书是与《远野物语》齐名的日本民俗文学经典, 为日本民俗学家、画家早川孝太郎的经典作品。最早出版于一九二六年, 收录了日本三河、横山等地区的老猎人等所讲述山野中出没的野兽的故事, 主要以野猪, 鹿和狸猫的轶事为主, 既有猎人山民的口头故事, 比如猎人射杀了超过90贯重的大野猪的故事、母鹿被杀死后跟来的小鹿的故事、在村庄发生的可疑事件怀疑是狸猫的恶作剧……又有流传甚广的民间传说, 诸如净琉璃姬与鹿、狸猫所变的文釜茶壶等, 还有民俗掌故等组成的独特的传统世界, 以取自日常生活的鲜活表达加上作者精心的文字加工而形成的民俗学经典作品, 文体简洁, 内容醇厚, 长期以来受到众多作家和文学爱好者的喜爱, 周作人、 芥川龙之介、柳田国男等人都对其有高度评价。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:59.067+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": " (日) 早川孝太郎著 , 熊韵译",
"nbBooktype": "图书",
"sortmark": "I313.45/1207",
"isbn": "978-7-5327-9043-2",
"nbPublisher": " 上海译文出版社",
"nbPublisherdate": "2022",
"nbRecno": "79"
},
{
"nbId": "2c9680978a8dea18018c2307b15218a3",
"libcode": "1201",
"nbName": "雏菊人生",
"nbExplain": "中篇小说 日本 现代",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:50.320+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(日)吉本芭娜娜著 , (日)奈良美智绘",
"nbBooktype": "图书",
"sortmark": "I313.45/1206",
"isbn": "978-7-5327-9157-6 ",
"nbPublisher": "上海译文出版社",
"nbPublisherdate": "2022",
"nbRecno": "80"
},
{
"nbId": "2c9680978a8dea18018c23060fc018a2",
"libcode": "1201",
"nbName": "像绅士淑女一样服务",
"nbExplain": "本书作者分享了丽思卡尔顿赖以生存的管理秘诀, 讲述了他在对待客户服务、员工激励和领导力构建三个方面的思考与智慧。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:41.960+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(美) 霍斯特·舒尔茨, 迪恩·梅里尔著 , 鲁仕齐译",
"nbBooktype": "图书",
"sortmark": "F274/145",
"isbn": "978-7-111-70377-8",
"nbPublisher": "机械工业出版社",
"nbPublisherdate": "2022",
"nbRecno": "81"
},
{
"nbId": "2c9680978a8dea18018c2304ed0118a1",
"libcode": "1201",
"nbName": "非自然死亡",
"nbExplain": "本书记录了作者理查德·谢泼德执业至今所经手的国际要案,从“9·11”事件、巴厘岛爆炸案、伦敦七七爆炸案,到亨格福德连环杀人案、戴安娜王妃车祸案等,讲述了案件背后不为人知的关键细节。书中还呈现了一些颇受争议的案件的始末,例如杀婴、种族主义谋杀、伪装成正当防卫的谋杀等。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:34.073+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(英)理查德·谢泼德(Richard Shepherd)著 , 李立丰译",
"nbBooktype": "图书",
"sortmark": "D919.1/3",
"isbn": "978-7-5447-8927-1",
"nbPublisher": " 译林出版社",
"nbPublisherdate": "2022",
"nbRecno": "82"
},
{
"nbId": "2c9680978a8dea18018b743e352d1837",
"libcode": "1201",
"nbName": "博物馆奇妙夜",
"nbExplain": "今天是梅森的生日,梅森选择在他喜欢的地方——博物馆,举办生日party……",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:17.807+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(美)卡伦·勒弗拉克著",
"nbBooktype": "少儿图书",
"sortmark": "I712.85/717",
"isbn": " 978-7-5143-7459-9",
"nbPublisher": " 现代出版社",
"nbPublisherdate": "2020",
"nbRecno": "84"
},
{
"nbId": "2c9680978a8dea18018b743bb92b1836",
"libcode": "1201",
"nbName": "特殊的任务",
"nbExplain": "特种兵学校的地理课告一段落了,因为猛虎小队和飞禽小队的队员们要和两位教官一起去热带雨林中执行一项重要的保密任务。这项保密任务队员们打探了一路也没能从教官们的口中得知。但是在任务执行过程中他们却学到了很多新的地理知识,而且这些地理知识还帮了他们大忙。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:09.993+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "八路,张博涵著",
"nbBooktype": "少儿图书",
"sortmark": "I287.47/418",
"isbn": "978-7-5595-4587-9",
"nbPublisher": "河北少年儿童出版社",
"nbPublisherdate": "2021",
"nbRecno": "85"
},
{
"nbId": "2c9680978a8dea18018b7435497c1834",
"libcode": "1201",
"nbName": "偷偷藏不住",
"nbExplain": "七年前,也有这么一天。她穿着干净的裙子,站在穿着学士服的段嘉许旁边,因为再次见到他而感到开心,又因为即将的离别而觉得难过至极。她笨拙地藏着自己的心思,不敢让任何人发现,无论是她多亲密的人。她想象着,未来有一天一定要到他的身边去。那个时候的桑稚一定没有想过,七年后,她所想象的这么一天真的到来了。如她所愿。桑稚真的成了段嘉许身边的那个人。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:11:01.777+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "竹已著",
"nbBooktype": "图书",
"sortmark": "I247.57/6312:2",
"isbn": "978-7-5552-8529-8",
"nbPublisher": "青岛出版社",
"nbPublisherdate": "2020",
"nbRecno": "86"
},
{
"nbId": "2c9680978a8dea18018b743074351833",
"libcode": "1201",
"nbName": "妈妈的勇气:引导孩子找到自己",
"nbExplain": "本书是剑桥妈妈&职业女性精英大赛冠军刘红燕写给中国父母的0-18岁系统养育指南。作者手把手教你破解二宝、早教、择校、写作业、亲子沟通、金钱教育、艺术教育、性教育、留学等0-18岁孩子的养育难题, 学完就能解决。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:10:49.990+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "刘红燕著",
"nbBooktype": "图书",
"sortmark": "G782/243",
"isbn": "978-7-5713-1430-9",
"nbPublisher": "江苏凤凰科学技术出版社",
"nbPublisherdate": "2021",
"nbRecno": "87"
},
{
"nbId": "2c908097837879e801837890167c0001",
"libcode": "1201",
"nbName": "2020中国年度散文诗精选",
"nbExplain": "",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:10:07.787+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "龚学敏 、 周庆荣",
"nbBooktype": "图书",
"sortmark": "I",
"isbn": "9787546428024",
"nbPublisher": "成都时代出版社",
"nbPublisherdate": "2021",
"nbRecno": "91"
},
{
"nbId": "2c908097837879e801837891699a0002",
"libcode": "1201",
"nbName": "宇宙之谜",
"nbExplain": "",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:09:59.337+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(德)恩斯特·海克尔",
"nbBooktype": "图书",
"sortmark": "G",
"isbn": "9787301313992",
"nbPublisher": "北京大学出版社",
"nbPublisherdate": "2020",
"nbRecno": "92"
},
{
"nbId": "2c908097837879e8018378922bb60003",
"libcode": "1201",
"nbName": "让科学发声--首都科学讲堂2020年集萃",
"nbExplain": "",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:09:40.317+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "马林",
"nbBooktype": "图书",
"sortmark": "P",
"isbn": "9787113283797",
"nbPublisher": "中国铁道出版社 ",
"nbPublisherdate": "2021",
"nbRecno": "93"
},
{
"nbId": "2c908097837879e8018378931a270004",
"libcode": "1201",
"nbName": "习近平在福州[专著]",
"nbExplain": "",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:09:26.873+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "中央党校采访实录编辑室著",
"nbBooktype": "图书",
"sortmark": "94",
"isbn": "9787503568404",
"nbPublisher": "中共中央党校出版社 ",
"nbPublisherdate": "2020",
"nbRecno": "0"
},
{
"nbId": "2c9680978c433d11018d2afeaa9a2358",
"libcode": "1201",
"nbName": "读书与藏书",
"nbExplain": "\t本书收录作者探访27为文化名家书房,听书房主人畅叙个人阅读经历,阐说读书观与藏书观的访谈录。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:09:04.050+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "绿茶",
"nbBooktype": "图书",
"sortmark": "K825.41=76/5",
"isbn": "978-7-5596-6736-6",
"nbPublisher": "北京联合出版公司",
"nbPublisherdate": "2023",
"nbRecno": "95"
},
{
"nbId": "2c9680978c433d11018d2b02cc58235a",
"libcode": "1201",
"nbName": "白鹭在冰面上站着",
"nbExplain": "无论被叫作香格里拉,还是勐巴拉西,云南都是“人间天堂”的意思。在著名作家、鲁迅文学奖得主雷平阳眼里,云南是他的文学诞生地,是他生活的现场,更是他的桃花源和乌有乡。这本散文集即为他的“桃花源记”。澜沧江、怒江、金沙江、牛栏江,乌蒙山、哀牢山、基诺山、南糯山,山水相依;天空、丛林、废墟,寺庙、悬崖、墓地,人神鬼巫,共生共荣,死生无迹。云南的山川物候、历史文脉、民生世情转化为其阔大的写作景深,接通了雷平阳的无际视域。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:08:55.253+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "雷平阳著",
"nbBooktype": "图书",
"sortmark": "I267/5253",
"isbn": "978-7-5447-9732-0",
"nbPublisher": "译林出版社",
"nbPublisherdate": "2023",
"nbRecno": "96"
},
{
"nbId": "2c9680978c433d11018d2b0180d72359",
"libcode": "1201",
"nbName": "追赶你老去的速度",
"nbExplain": "本书是荷尔德林1785-1826年间,与亲人的通信,包括他和母亲、弟弟妹妹的通信。书信内容较为全面地反映了诗人与亲人交流的方式,生活的变故等。原文思想深邃,文学性强,译文准确、洗练。书信内容从一个侧面反映了诗人与亲人交流的真实状态,也反映了当时德国的社会风貌,是研究德国历史、文化,以及诗人创作成就不可多得的一手资料。书稿兼具学术性、艺术性和史料价值。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:08:45.640+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(德)荷尔德林著 , 王佐良译",
"nbBooktype": "图书",
"sortmark": "K835.165/11",
"isbn": "978-7-205-10415-3",
"nbPublisher": "辽宁人民出版社",
"nbPublisherdate": "2022",
"nbRecno": "97"
},
{
"nbId": "2c9680978c433d11018d2afca7002357",
"libcode": "1201",
"nbName": "这个三国史很上头",
"nbExplain": "本书分军阀篇、曹魏篇、蜀汉篇、东吴篇、三分归晋篇五编,内容包括:“吕布:有多勇武,就有多不受待见”“公孙瓒:从白马将军到笼中困兽”“袁绍:小气量失大天下”等。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:08:36.740+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "张大可",
"nbBooktype": "图书",
"sortmark": "K236/7",
"isbn": "978-7-5411-6391-3 ",
"nbPublisher": "四川文艺出版社",
"nbPublisherdate": "2022",
"nbRecno": "98"
},
{
"nbId": "2c9680978a8dea18018c22fdc47b189f",
"libcode": "1201",
"nbName": "阿富汗文件",
"nbExplain": "本书是对“阿富汗战争”的深度调查,揭示了美国在阿富汗战争中的谎言、欺骗与真相。美国以反恐为名发动战争,这是被净化了的官方叙事。作者获取了大量美国政府未敢公开的内部文件,在书中揭示了美国如何陷入一场劳师动众的战争,并决心对公众隐瞒失败的真相。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:08:27.763+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(美)克雷格·惠特洛克(Craig Whitlock)著 , 陈小迁,张文斗译",
"nbBooktype": "图书",
"sortmark": "D815.4/8",
"isbn": "978-7-5217-3900-8 ",
"nbPublisher": "中信出版集团股份有限公司",
"nbPublisherdate": "2022",
"nbRecno": "99"
},
{
"nbId": "2c9680978a8dea18018c22fb1575189e",
"libcode": "1201",
"nbName": "效率脑科学",
"nbExplain": "本书根据最新的脑科学研究成果,耗费数年时间写作了这本工作脑科学著作,其中的方法经过了知名企业的多次验证,切实提高了人们的工作效率。",
"createTime": null,
"creater": null,
"updateTime": "2024-04-03T01:08:18.827+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": " (美)戴维·罗克(David Rock)著 , 马梦捷译",
"nbBooktype": "图书",
"sortmark": "C934/46",
"isbn": "978-7-115-57971-3 ",
"nbPublisher": "人民邮电出版社",
"nbPublisherdate": "2022",
"nbRecno": "99"
},
{
"nbId": "2c9680978e7f2e4f018ea17f94140021",
"libcode": "1201",
"nbName": "爱丽莎的眼睛",
"nbExplain": "法国圣埃克苏佩文学奖获得者蒂莫泰.德.丰拜勒的代表作,这是一部历险小说,也是一部幻想曲,更是一篇保护生态环境的宣言。它简单又神秘,平实又激动人心,故事扣人心弦。它嘲笑无知和权势,赞扬智慧与勇敢,崇尚人间真情,它将给我们带来精神上的洗礼,是一部难得可贵的心灵宝典。",
"createTime": "2024-04-03T01:07:56.563+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:07:56.563+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(法) 蒂莫泰·德·丰拜勒著",
"nbBooktype": "图书",
"sortmark": "I565.84/50",
"isbn": "978-7-5307-4994-4",
"nbPublisher": "新蕾出版社",
"nbPublisherdate": "2011",
"nbRecno": "12"
},
{
"nbId": "2c9680978e7f2e4f018ea17ec74c0020",
"libcode": "1201",
"nbName": "一句顶一万句",
"nbExplain": "茅盾文学奖获奖作品",
"createTime": "2024-04-03T01:07:04.140+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:07:04.140+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "刘震云",
"nbBooktype": "图书",
"sortmark": "I247.57/6485",
"isbn": "978-7-5360-9726-1",
"nbPublisher": "花城出版社",
"nbPublisherdate": "2022",
"nbRecno": "13"
},
{
"nbId": "2c9680978e7f2e4f018ea17e1cf5001f",
"libcode": "1201",
"nbName": "鱼肚白点亮的记忆",
"nbExplain": "本书以时间为序, 串起作者徐淑云的人生岁月, 记下作者在追忆中的思索, 思索中的感悟, 感悟中的思想升华。本书让读者在治愈中思考, 在思考中感动, 给读者以美的享受。",
"createTime": "2024-04-03T01:06:20.533+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:06:20.533+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "徐淑云",
"nbBooktype": "图书",
"sortmark": "I267/5257",
"isbn": "978-7-203-12327-9",
"nbPublisher": "山西人民出版社",
"nbPublisherdate": "2022",
"nbRecno": "13"
},
{
"nbId": "2c9680978e7f2e4f018ea17acb3d001b",
"libcode": "1201",
"nbName": "哈姆雷特",
"nbExplain": "生存还是死亡,哈姆雷特的经典疑问。这本书是莎士比亚的经典,讲的是丹麦王子哈姆雷特历经艰险为父报仇的故事。读了这本书,孩子可以感受到大文豪优美的文笔并且可以体会人世间的酸甜苦辣。",
"createTime": "2024-04-03T01:02:43.003+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:02:43.003+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(英)威廉·莎士比亚著 , (英)查尔斯·兰姆,(英)玛丽·兰姆改写",
"nbBooktype": "图书",
"sortmark": "I561.33/76:1",
"isbn": "978-7-5470-6068-1",
"nbPublisher": "万卷出版有限责任公司",
"nbPublisherdate": "2022",
"nbRecno": "16"
},
{
"nbId": "2c9680978e7f2e4f018ea179eafe001a",
"libcode": "1201",
"nbName": "一分钟",
"nbExplain": "本书收录了著名儿童文学作家鲁兵的童话,通过主人公的经历,让孩子明白时间规划的重要性,培养孩子良好习惯的养成。",
"createTime": "2024-04-03T01:01:45.597+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:01:45.597+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": " 鲁兵著",
"nbBooktype": "绘本",
"sortmark": "I287/194:2",
"isbn": "978-7-5702-3231-4",
"nbPublisher": "长江文艺出版社",
"nbPublisherdate": "2023",
"nbRecno": "17"
},
{
"nbId": "2c9680978e7f2e4f018ea17916cf0019",
"libcode": "1201",
"nbName": "数不清!大自然的生物多样性",
"nbExplain": "一本让孩子看见大自然奥秘的美丽图画书籍。",
"createTime": "2024-04-03T01:00:51.277+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T01:00:51.277+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "[英]尼古拉·戴维斯文",
"nbBooktype": "绘本",
"sortmark": "I561.85/527",
"isbn": "978-7-5332-9625-4",
"nbPublisher": " 明天出版社",
"nbPublisherdate": "2018",
"nbRecno": "17"
},
{
"nbId": "2c9680978e7f2e4f018ea17840360018",
"libcode": "1201",
"nbName": "猜猜我有多爱你",
"nbExplain": "两只兔子短短的对话,浓缩生命中最复杂、最伟大的情感,引导孩子通过不同方式表达爱, 整个绘本充满爱和童趣。",
"createTime": "2024-04-03T00:59:56.340+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T00:59:56.340+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "(爱尔兰)山姆·麦克布雷尼著 , (英)安妮塔·婕朗图",
"nbBooktype": "绘本",
"sortmark": "I562.85/20",
"isbn": "978-7-5332-7426-9",
"nbPublisher": "明天出版社",
"nbPublisherdate": "2022",
"nbRecno": "18"
},
{
"nbId": "2c9680978e7f2e4f018ea17732290017",
"libcode": "1201",
"nbName": "春雨落长河",
"nbExplain": "故事情节精彩跌宕, 描绘世事交变中奇诡的人生棋局; 凸显出鲜明细腻的人物性格, 尽显大时代背景下的人性之美与悲情; 具有着强烈的现实主义浪漫, 深厚的民国文化底蕴, 是一部构思精密、气势宏大的年代小说。",
"createTime": "2024-04-03T00:58:47.207+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T00:58:47.207+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "江天雪意",
"nbBooktype": "图书",
"sortmark": "I247.5/5673",
"isbn": "978-7-226-05792-6",
"nbPublisher": "甘肃人民出版社",
"nbPublisherdate": "2023",
"nbRecno": "19"
},
{
"nbId": "2c9680978e7f2e4f018ea17657e20016",
"libcode": "1201",
"nbName": "沟通力成就领导力",
"nbExplain": "托马斯·戈登博士美国著名心理学家,本书把博士享誉全球的人际关系模型 (戈登沟通模式) 传授给领导者。",
"createTime": "2024-04-03T00:57:51.330+0000",
"creater": "297edff88354751d018359cd2e120000",
"updateTime": "2024-04-03T00:57:51.330+0000",
"updater": "297edff88354751d018359cd2e120000",
"nbAuthor": "托马斯·戈登",
"nbBooktype": "图书",
"sortmark": "C933.2/40",
"isbn": "978-7-5763-1840-1",
"nbPublisher": "北京理工大学出版社",
"nbPublisherdate": "2023",
"nbRecno": "20"
}
]

422
src/views/pageOne/index.vue

@ -82,8 +82,10 @@
<div class="small-module">
<div class="chartNum">
<div class="box-items">
<li v-for="(e,i) in item.valueArr" :key="i" class="number-item">
<span><i ref="numberItem" class="item">0123456789</i></span>
<li v-for="(e,i) in item.valueArr" :key="i" :class="!isNaN(e) ? 'number-item':'number-item num-dot'">
<span v-if="!isNaN(e)" class="items-int"><i ref="numberItem" class="item">0123456789</i></span>
<span v-else>{{ e }}</span>
<!-- <span><i ref="numberItem" class="item">0123456789</i></span> -->
</li>
</div>
</div>
@ -99,15 +101,11 @@
<div class="database-right">
<h3 class="database-title">热门搜索</h3>
<div class="tagcloud-main">
<!-- <div id="tagcloud1" class="tagcloud">
<p v-for="(item,index) in hotTagData" :key="index" :class="'color' + ((index % 4) + 1)">
<span>{{ item }}</span>
</p>
</div> -->
<div id="tagscloud">
<a v-for="(item,index) in hotTagData" :key="index" :class="'tagc' + ((index % 4) + 1)">
<div id="tagscloud" ref="tagcloudall" class="tagscloud">
<!-- <a v-for="(item,index) in hotTagData" :key="index" :class="'tagc' + ((index % 4) + 1)">
{{ item }}
</a>
</a> -->
<a v-for="(item,index) in tagList" :key="index" :class="'tagc' + ((index % 4) + 1)">{{ item }}</a>
</div>
</div>
</div>
@ -152,7 +150,7 @@
</div>
<div class="wechat-code">
<div class="wechat-img">
二维码
<img :src="wecharQrCodeSrc">
</div>
<span>微信扫一扫关注</span>
</div>
@ -162,13 +160,14 @@
</template>
<script>
import { FetchInitSetting, FetchHotSearch, FetchFansCount, FetchNewBook } from '@/api/library'
import '@/assets/js/tagscloud.js'
import { FetchInitSetting, FetchUsertotal, FetchLibBookTotal, FetchHotSearch, FetchFansCount, FetchLendingTotal, FetchNewBook } from '@/api/library'
export default {
name: 'PageOne',
data() {
return {
isDataLoaded: false,
pageOneVisitBase: '0', //
wecharQrCodeSrc: null,
newList: [],
listData1: [],
listData2: [],
@ -197,7 +196,29 @@ export default {
}
],
hotTagData: [],
middleData: []
middleData: [],
tagList: [],
radius: 160,
dtr: Math.PI / 180,
d: 200,
mcList: [],
active: false,
lasta: 1,
lastb: 1,
distr: true,
tspeed: 4,
size: 200,
mouseX: 0,
mouseY: 20,
howElliptical: 1,
oList: null,
oA: null,
sa: 0,
ca: 0,
sb: 0,
cb: 0,
sc: 0,
cc: 0
}
},
computed: {
@ -239,53 +260,161 @@ export default {
}
}
},
created() {
this.getInitSetting()
async created() {
this.getHotSearch()
this.getFansNum()
this.getInitData()
this.getNewBook()
this.getMiddleAllData()
},
beforeDestroy() {
clearTimeout(this.timer2)
},
async mounted() {
this.initPageOne()
// this.tagAnimation()
mounted() {
// setTimeout(() => {
// this.$parent.autoPagination(2)
// }, 8000)
},
methods: {
getInitSetting() {
getInitData() {
// visitBase
// wecharQrCode /downloadFile/+wecharQrCode
// selectorder 1 2
// show1
// show2
// ...
// iNotice
const linkSrc = process.env.VUE_APP_BASE_API
FetchInitSetting().then(res => {
console.log(res)
const result = JSON.parse(res.data)
this.pageOneVisitBase = result.visitBase
this.wecharQrCodeSrc = linkSrc + '/downloadFile' + result.wecharQrCode
this.initDataPreview()
})
},
//
getHotSearch() {
const params = {
'size': 40
}
FetchHotSearch(params).then(res => {
this.hotTagData = res.data.replace(/^\[|\]$/g, '').split(', ')
this.$nextTick(() => {
this.tagList = this.hotTagData
this.onReady()
})
})
},
getFansNum() {
FetchFansCount().then(res => {
this.middleData.push({
id: 'fansNum',
name: '粉丝数量',
value: res.data,
valueArr: res.data.toString().split('')
getMiddleAllData() {
Promise.all([
this.getLibBookTotal(),
this.getUserTotal(),
this.getFansNum(),
this.getLendingTotal()
]).then(([libBookTotal, userCardNum, fansNum, lendingTotal]) => {
this.middleData.push(
{
id: 'totalBook',
name: '藏书总量',
value: libBookTotal,
valueArr: this.$parent.formatter(libBookTotal).toString().split('')
},
{
id: 'cardNum',
name: '累计办证',
value: userCardNum,
valueArr: this.$parent.formatter(userCardNum).toString().split('')
},
{
id: 'fansNum',
name: '粉丝数量',
value: fansNum,
valueArr: this.$parent.formatter(fansNum).toString().split('')
},
{
id: 'lendingNum',
name: '累计借出',
value: lendingTotal,
valueArr: this.$parent.formatter(lendingTotal).toString().split('')
}
)
console.log('this.middleData', this.middleData)
this.$parent.timedRefresh(this.middleData, 'middle')
// setTimeout(() => {
// this.$parent.timedRefresh(this.middleData, 'middle')
// }, 8000)
}).catch(error => {
console.error('Error fetching data:', error)
})
},
//
getLibBookTotal() {
const params = {
'libcode': 'LSJDFG,LJPFG,DCDFG,QYTSG,SJLFG,XMDFG,FXLFG,QLQFG,SEDSG,MZZFG,GYTZFG,KJSKCFG,JBTZFG,SKTZFG,XJZFG,PSZFG,DZQZFG,WXJDFG,CHJDFG,BSZFG,BZHFG',
'starttime': '2000-01-01',
'endtime': '2034-01-01'
}
return FetchLibBookTotal(params).then(res => {
const result = JSON.parse(res.data)
if (result.success & result.resultlist.length !== 0) {
return result.resultlist.reduce((acc, obj) => acc + obj.GCL, 0)
} else {
return 0
}
}).catch(error => {
console.error('Error', error)
return 0
})
},
//
getTotalForLibcode(libcode) {
const params = {
'libcode': libcode,
'startdate': '2000-01-01',
'enddate': '2034-01-01',
'isrdtype': 0
}
return FetchUsertotal(params).then(res => {
const result = JSON.parse(res.data)
if (result.success && result.pagedata.length > 0) {
return result.pagedata[0].count
} else {
throw new Error('Failed' + libcode)
}
}).catch(error => {
console.error('Error' + libcode, error)
return 0
})
},
getUserTotal() {
const libraries = ['QYTSG', 'SJLFG', 'FXLFG', 'SEDSG', 'BZHFG']
const getTotalPromises = libraries.map(libcode => this.getTotalForLibcode(libcode))
return Promise.all(getTotalPromises)
.then(counts => counts.reduce((sum, count) => sum + parseInt(count, 10), 0))
.catch(error => {
console.error('Error', error)
return 0
})
},
//
getFansNum() {
return FetchFansCount().then(res => {
return res.data ? parseInt(res.data) : 0
}).catch(error => {
console.error('Error', error)
return 0
})
},
//
getLendingTotal() {
return FetchLendingTotal().then(res => {
const result = JSON.parse(res.data)
if (result.success & result.resultlist.length !== 0) {
return result.resultlist.filter(item => item.LIBCODE !== '999').reduce((acc, obj) => acc + obj.JCC, 0)
} else {
return 0
}
}).catch(error => {
console.error('Error', error)
return 0
})
},
// bottom -
getNewBook() {
const params = {
'size': 40
@ -330,83 +459,193 @@ export default {
const type4Item = this.progressdata.find(item => item.type === 4)
return type4Item ? type4Item.value : 0
},
tagAnimation() {
tagCloud({
selector: '#tagcloud1', // id class
fontsize: 22, // , 16px
radius: 440, // /, 60px60[60][60, 60]
mspeed: 'slow', // , : slow, normal(), fast
ispeed: 'normal', // , : slow, normal(), fast
direction: 135, // , (360): 0top, 90left, 135right-bottom()...
keep: false, // , : false, true() ,
multicolour: false // true(),false
})
},
async initPageOne() {
//
await this.initDataPreview()
await this.ininMiddleData()
},
async initDataPreview() {
//
const previewData = {
'code': 0,
'data': {
'allUserNumCount': 224771,
'allUserOpenNumCount': 68
},
'message': 'success'
}
if (previewData.code !== 0) return
this.allUserNumCount = previewData.data.allUserNumCount
this.leftData = []
this.leftData.push({
id: 'allTotal',
name: '本年累计到馆',
value: this.$parent.formatter(previewData.data.allUserNumCount),
valueArr: this.$parent.formatter(previewData.data.allUserNumCount).split('')
value: this.$parent.formatter(this.pageOneVisitBase),
valueArr: this.$parent.formatter(this.pageOneVisitBase).split('')
}, {
id: 'currentNum',
name: '当前在馆人数',
value: this.$parent.formatter(previewData.data.allUserOpenNumCount),
valueArr: this.$parent.formatter(previewData.data.allUserOpenNumCount).split('')
})
setTimeout(() => {
this.$parent.timedRefresh(this.leftData, 'left')
}, 1000)
this.$parent.timedRefresh(this.leftData, 'left')
// setTimeout(() => {
// this.$parent.timedRefresh(this.leftData, 'left')
// }, 1000)
},
async ininMiddleData() {
const previewData = {
'code': 0,
'data': {
'number1': 679363,
'number2': 5927,
'number3': 34798,
'number4': 30541
},
'message': 'success'
}
this.middleData = []
this.middleData.push({
id: 'totalBook',
name: '藏书总量',
value: previewData.data.number1,
valueArr: previewData.data.number1.toString().split('')
}, {
id: 'lendingNum',
name: '累计借出',
value: previewData.data.number3,
valueArr: previewData.data.number3.toString().split('')
}, {
id: 'cardNum',
name: '累计办证',
value: previewData.data.number4,
valueArr: previewData.data.number4.toString().split('')
//
//
sineCosine(a, b, c) {
this.sa = Math.sin(a * this.dtr)
this.ca = Math.cos(a * this.dtr)
this.sb = Math.sin(b * this.dtr)
this.cb = Math.cos(b * this.dtr)
this.sc = Math.sin(c * this.dtr)
this.cc = Math.cos(c * this.dtr)
},
//
positionAll() {
this.$nextTick(() => { // : onReady$nextTick
var phi = 0
var theta = 0
var max = this.mcList.length
var aTmp = []
var oFragment = document.createDocumentFragment()
//
for (let i = 0; i < this.tagList.length; i++) {
aTmp.push(this.oA[i])
}
aTmp.sort(() => {
return Math.random() < 0.5 ? 1 : -1
})
for (let i = 0; i < aTmp.length; i++) {
oFragment.appendChild(aTmp[i])
}
this.oList.appendChild(oFragment)
for (let i = 1; i < max + 1; i++) {
if (this.distr) {
phi = Math.acos(-1 + (2 * i - 1) / max)
theta = Math.sqrt(max * Math.PI) * phi
} else {
phi = Math.random() * (Math.PI)
theta = Math.random() * (2 * Math.PI)
}
//
this.mcList[i - 1].cx = this.radius * Math.cos(theta) * Math.sin(phi)
this.mcList[i - 1].cy = this.radius * Math.sin(theta) * Math.sin(phi)
this.mcList[i - 1].cz = this.radius * Math.cos(phi)
this.oA[i - 1].style.left = this.mcList[i - 1].cx + this.oList.offsetWidth / 2 - this.mcList[i - 1].offsetWidth / 2 + 'px'
this.oA[i - 1].style.top = this.mcList[i - 1].cy + this.oList.offsetHeight / 2 - this.mcList[i - 1].offsetHeight / 2 + 'px'
}
})
},
//
update() {
this.$nextTick(() => { // : onReady$nextTick
var a
var b
// if (this.active) {
a = (Math.min(Math.max(-this.mouseY, -this.size), this.size) / this.radius) * this.tspeed
b = (-Math.min(Math.max(-this.mouseX, -this.size), this.size) / this.radius) * this.tspeed
// } else {
// a = this.lasta * 0.98
// b = this.lastb * 0.98
// }
this.lasta = a
this.lastb = b
if (Math.abs(a) <= 0.01 && Math.abs(b) <= 0.01) {
return
}
var c = 0
this.sineCosine(a, b, c)
for (var j = 0; j < this.mcList.length; j++) {
if (this.mcList[j].on) {
continue
}
var rx1 = this.mcList[j].cx
var ry1 = this.mcList[j].cy * this.ca + this.mcList[j].cz * (-this.sa)
var rz1 = this.mcList[j].cy * this.sa + this.mcList[j].cz * this.ca
var rx2 = rx1 * this.cb + rz1 * this.sb
var ry2 = ry1
var rz2 = rx1 * (-this.sb) + rz1 * this.cb
var rx3 = rx2 * this.cc + ry2 * (-this.sc)
var ry3 = rx2 * this.sc + ry2 * this.cc
var rz3 = rz2
this.mcList[j].cx = rx3
this.mcList[j].cy = ry3
this.mcList[j].cz = rz3
var per = this.d / (this.d + rz3)
this.mcList[j].x = (this.howElliptical * rx3 * per) - (this.howElliptical * 2)
this.mcList[j].y = ry3 * per
this.mcList[j].scale = per
var alpha = per
alpha = (alpha - 0.6) * (10 / 6)
this.mcList[j].alpha = alpha * alpha * alpha - 0.2
// this.mcList[j].alpha = (this.mcList[j].alpha - 0.6) * (10 / 6)
this.mcList[j].zIndex = Math.ceil(100 - Math.floor(this.mcList[j].cz))
}
this.doPosition()
this.depthSort()
})
},
//
doPosition() {
this.$nextTick(() => { // : onReady$nextTick
var l = this.oList.offsetWidth / 2
var t = this.oList.offsetHeight / 2
for (var i = 0; i < this.mcList.length; i++) {
this.oA[i].style.left = this.mcList[i].cx + l - this.mcList[i].offsetWidth / 2 + 'px'
this.oA[i].style.top = this.mcList[i].cy + t - this.mcList[i].offsetHeight / 2 + 'px'
// this.oA[i].style.fontSize = Math.ceil(12 * this.mcList[i].scale / 2) + 8 + 'px'
this.oA[i].style.filter = 'alpha(opacity=' + 100 * this.mcList[i].alpha + ')'
this.oA[i].style.opacity = this.mcList[i].alpha
}
})
},
depthSort() {
this.$nextTick(() => { // : onReady$nextTick
var aTmp = []
for (let i = 0; i < this.oA.length; i++) {
aTmp.push(this.oA[i])
}
aTmp.sort(function(vItem1, vItem2) {
if (vItem1.cz > vItem2.cz) {
return -1
} else if (vItem1.cz < vItem2.cz) {
return 1
} else {
return 0
}
})
for (let i = 0; i < aTmp.length; i++) {
aTmp[i].style.zIndex = i
}
})
},
onReady() {
this.$nextTick(() => {
this.oList = this.$refs.tagcloudall
this.oA = this.oList.getElementsByTagName('a')
var oTag = null
for (var i = 0; i < this.oA.length; i++) {
oTag = {}
oTag.offsetWidth = this.oA[i].offsetWidth
oTag.offsetHeight = this.oA[i].offsetHeight
this.mcList.push(oTag)
}
this.sineCosine(0, 0, 0)
this.positionAll()
this.oList.onmouseover = () => {
this.active = true
}
this.oList.onmouseout = () => {
this.active = false
}
// this.oList.onmousemove = (event) => {
// var oEvent = window.event || event
setTimeout(() => {
this.$parent.timedRefresh(this.middleData, 'middle')
}, 1000)
// this.mouseX = oEvent.clientX - (this.oList.offsetLeft + this.oList.offsetWidth / 2)
// this.mouseY = oEvent.clientY - (this.oList.offsetTop + this.oList.offsetHeight / 2)
// this.mouseX /= 5
// this.mouseY /= 5
// }
setInterval(() => {
this.update()
}, 40) // setInterval(this.update(), 30)
})
}
}
}
@ -420,7 +659,7 @@ export default {
width:400px;
height:380px;
position:relative;
margin:10px auto 0 auto;
margin:0 auto;
}
#tagscloud a{
@ -434,7 +673,6 @@ export default {
display:inline-block;
text-wrap: nowrap;
}
#tagscloud a.tagc1{
border: 1px solid #30ADA6;
background-color: #106B66;
@ -442,14 +680,14 @@ export default {
}
#tagscloud a.tagc2{
font-size: 22px;
font-size: 16px;
border: 1px solid #3A64BE;
background: rgba(16,45,107,0.7);
color: #7EA7FF;
}
#tagscloud a.tagc3{
font-size: 16px;
font-size: 22px;
border: 1px solid #9439B6;
background: rgba(74,18,95,0.8);
color: #CD63F4;

6
vue.config.js

@ -25,11 +25,11 @@ module.exports = {
'^/qyzt': 'qyzt'
}
},
'/auth/': {
target: process.env.VUE_APP_BASE_API,
'/openlib/': {
target: process.env.VUE_APP_LIB_API,
changeOrigin: true,
pathRewrite: {
'^/auth': 'auth'
'^/openlib': 'openlib'
}
}
}

Loading…
Cancel
Save