榄菊质量管理平台表格增加自动滚动功能

yangwl
lucungang 4 months ago
parent 75ffa99618
commit 244ea2bd5b

@ -52,6 +52,7 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.5.4",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
@ -62,6 +63,7 @@
"vue-cropper": "0.5.5", "vue-cropper": "0.5.5",
"vue-meta": "2.4.0", "vue-meta": "2.4.0",
"vue-router": "3.4.9", "vue-router": "3.4.9",
"vue-seamless-scroll": "^1.1.23",
"vuedraggable": "2.24.3", "vuedraggable": "2.24.3",
"vuex": "3.6.0", "vuex": "3.6.0",
"xlsx": "^0.17.0" "xlsx": "^0.17.0"

@ -46,6 +46,8 @@ import dataV from '@jiaminghi/data-view'
// 打印插件 // 打印插件
import Print from 'print-js' import Print from 'print-js'
import VScaleScreen from 'v-scale-screen' import VScaleScreen from 'v-scale-screen'
// 滚动
import VueSeamlessScroll from 'vue-seamless-scroll'
// 全局方法挂载 // 全局方法挂载
@ -71,6 +73,7 @@ Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview) Vue.component('ImagePreview', ImagePreview)
Vue.use(VScaleScreen) Vue.use(VScaleScreen)
Vue.use(VueSeamlessScroll)
Vue.use(directive) Vue.use(directive)
Vue.use(plugins) Vue.use(plugins)
Vue.use(VueMeta) Vue.use(VueMeta)

@ -117,6 +117,7 @@
<div class="titlebox" style="margin-bottom: 14px;"> <div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">质量异常信息</div> <div class="titlename">质量异常信息</div>
</div> </div>
<vue-seamless-scroll :data="Qualitylist" class="wrapscroll" :class-option="classOption" style="height:400px">
<div class="table-tbody"> <div class="table-tbody">
<div class="item" :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" <div class="item" :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px"
:key="index" v-for="(n, index) in Qualitylist"> :key="index" v-for="(n, index) in Qualitylist">
@ -132,6 +133,7 @@
</div> </div>
</div> </div>
</div> </div>
</vue-seamless-scroll>
</div> </div>
<div class="item-table item-table1"> <div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;"> <div class="titlebox" style="margin-bottom: 14px;">
@ -191,6 +193,12 @@ export default {
}, },
data() { data() {
return { return {
classOption:{
direction: 1,
hoverstop:true, step: 0.5,
openNatch: true,
limitMoveNum:7
},
gettimedata: "", gettimedata: "",
selectxt: null, selectxt: null,
selectxtclasses: null, selectxtclasses: null,
@ -269,7 +277,7 @@ export default {
const _this = this; const _this = this;
getDeviceRefreshTime().then((response) => { getDeviceRefreshTime().then((response) => {
if (response.data) { if (response.data) {
console.log(response.data) // console.log(response.data)
this.RefreshTime = response.data this.RefreshTime = response.data
this.time1 = setInterval(() => { this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt) _this.getdatalist(_this.selectxt)
@ -286,7 +294,7 @@ export default {
} }
).then((response) => { ).then((response) => {
if (response) { if (response) {
console.log(response) // console.log(response)
this.dictDatatype = response this.dictDatatype = response
_this.selectxtclasses = _this.dictDatatype[0].ymdType; _this.selectxtclasses = _this.dictDatatype[0].ymdType;
this.getDeviceRefreshTime() this.getDeviceRefreshTime()
@ -439,7 +447,7 @@ export default {
], ],
}; };
myChart3.setOption(option3); myChart3.setOption(option3);
console.log(_this.selectxt) // console.log(_this.selectxt)
getProMonthNoOk({ getProMonthNoOk({
typeCode: 'produce', typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt, factoryCode: 'ds_' + _this.selectxt,
@ -449,7 +457,7 @@ export default {
let dataoption = []; let dataoption = [];
let totalArr = []; let totalArr = [];
_this.optionDatalist3 = []; _this.optionDatalist3 = [];
console.log(response) // console.log(response)
for (let index = 0; index < response.month.length; index++) { for (let index = 0; index < response.month.length; index++) {
let a = {}; let a = {};
response.month[index] = moment(response.month[index]).format('MM') response.month[index] = moment(response.month[index]).format('MM')
@ -468,7 +476,7 @@ export default {
dataoption.forEach((item) => { dataoption.forEach((item) => {
totalArr.push(max); totalArr.push(max);
}); });
console.log(dataoption, numberlist) // console.log(dataoption, numberlist)
// response = [{ name: "1", code: "100", value: '100', }] // response = [{ name: "1", code: "100", value: '100', }]
// if (response.length > 0) { // if (response.length > 0) {
option3 = { option3 = {
@ -629,7 +637,7 @@ export default {
let yAxismaxall = 0 let yAxismaxall = 0
dataoption.forEach((n) => { dataoption.forEach((n) => {
if (n.data) { if (n.data) {
console.log(Math.max(...n.data), n.data) // console.log(Math.max(...n.data), n.data)
yAxismax.push(Math.max(...n.data)) yAxismax.push(Math.max(...n.data))
} }
var item = { var item = {
@ -661,7 +669,7 @@ export default {
], ],
series: seriesmyChart5 series: seriesmyChart5
}; };
console.log(seriesmyChart5,'111111111111111') // console.log(seriesmyChart5,'111111111111111')
myChart5.setOption(option5); myChart5.setOption(option5);
} }
}); });
@ -1826,7 +1834,9 @@ export default {
.app-container { .app-container {
padding: 0px 24px; padding: 0px 24px;
} }
.wrapscroll{
overflow: hidden;
}
.home { .home {
width: 100%; width: 100%;
height: 100vh; height: 100vh;

Loading…
Cancel
Save