提交 df13bfa0 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

refactor: 前端eslint警告以及报错

上级 7be6d0eb
...@@ -150,6 +150,7 @@ export function taskList(spage, size, data) { ...@@ -150,6 +150,7 @@ export function taskList(spage, size, data) {
return request({ return request({
url: '/dataset/group/isKettleRunning', url: '/dataset/group/isKettleRunning',
method: 'post', method: 'post',
// eslint-disable-next-line no-undef
loading: showLoading loading: showLoading
}) })
} }
......
...@@ -471,6 +471,7 @@ function removeItem(index) { ...@@ -471,6 +471,7 @@ function removeItem(index) {
this.yourList.splice(index, 1, {}) this.yourList.splice(index, 1, {})
} }
// eslint-disable-next-line no-unused-vars
function initPosition(_this) { function initPosition(_this) {
_this.yourList.forEach(item => { _this.yourList.forEach(item => {
checkItemPosition.call(_this, item, { checkItemPosition.call(_this, item, {
...@@ -501,6 +502,7 @@ function addItem(item, index) { ...@@ -501,6 +502,7 @@ function addItem(item, index) {
// makeCoordinate.call(this, item); // makeCoordinate.call(this, item);
} }
// eslint-disable-next-line no-unused-vars
function changeToCoord(left, top, width, height) { function changeToCoord(left, top, width, height) {
return { return {
x1: left, x1: left,
...@@ -517,6 +519,7 @@ function changeToCoord(left, top, width, height) { ...@@ -517,6 +519,7 @@ function changeToCoord(left, top, width, height) {
* *
* @param {any} tCoord 比对对象的坐标 * @param {any} tCoord 比对对象的坐标
*/ */
// eslint-disable-next-line no-unused-vars
function findClosetCoords(item, tCoord) { function findClosetCoords(item, tCoord) {
if (isOverlay) return if (isOverlay) return
let i = coordinates.length let i = coordinates.length
...@@ -560,6 +563,7 @@ function findClosetCoords(item, tCoord) { ...@@ -560,6 +563,7 @@ function findClosetCoords(item, tCoord) {
* *
* @param {any} item * @param {any} item
*/ */
// eslint-disable-next-line no-unused-vars
function makeCoordinate(item) { function makeCoordinate(item) {
const width = this.cellWidth * (item.sizex) - this.baseMarginLeft const width = this.cellWidth * (item.sizex) - this.baseMarginLeft
const height = this.cellHeight * (item.sizey) - this.baseMarginTop const height = this.cellHeight * (item.sizey) - this.baseMarginTop
...@@ -750,7 +754,7 @@ function findBelowItems(item) { ...@@ -750,7 +754,7 @@ function findBelowItems(item) {
return _.sortBy(_.values(belowItems), 'y') return _.sortBy(_.values(belowItems), 'y')
} }
// eslint-disable-next-line no-unused-vars
function getoPsitionBox() { function getoPsitionBox() {
return positionBox return positionBox
} }
...@@ -1287,6 +1291,7 @@ export default { ...@@ -1287,6 +1291,7 @@ export default {
this.resizeStart.call(null, e, item, index) this.resizeStart.call(null, e, item, index)
// e.preventDefault(); // e.preventDefault();
// eslint-disable-next-line no-unused-vars
const target = $(e.target) const target = $(e.target)
if (!this.infoBox) { if (!this.infoBox) {
......
...@@ -283,24 +283,7 @@ export default { ...@@ -283,24 +283,7 @@ export default {
] ]
} }
}, },
watch: {
innerOpacity: {
handler(oldVal, newVal) {
this.styleInfo['opacity'] = this.innerOpacity / 100
}
},
curComponent: {
handler(oldVal, newVal) {
this.$nextTick(() => {
this.init()
})
// console.log('curComponent change')
}
}
},
mounted() {
this.init()
},
computed: { computed: {
boardDivColor() { boardDivColor() {
const style = { const style = {
...@@ -348,6 +331,25 @@ export default { ...@@ -348,6 +331,25 @@ export default {
]) ])
}, },
watch: {
innerOpacity: {
handler(oldVal, newVal) {
this.styleInfo['opacity'] = this.innerOpacity / 100
}
},
curComponent: {
handler(oldVal, newVal) {
this.$nextTick(() => {
this.init()
})
// console.log('curComponent change')
}
}
},
mounted() {
this.init()
},
methods: { methods: {
init() { init() {
if (this.styleInfo['opacity']) { if (this.styleInfo['opacity']) {
......
<template> <template>
<el-row ref="mainPlayer"> <el-row ref="mainPlayer">
<div v-if="this.element.videoLinks[this.element.videoLinks.videoType].sources[0].src" class="player"> <div v-if="element.videoLinks[element.videoLinks.videoType].sources[0].src" class="player">
<video-player <video-player
ref="videoPlayer" ref="videoPlayer"
class="vjs-custom-skin" class="vjs-custom-skin"
...@@ -62,10 +62,7 @@ export default { ...@@ -62,10 +62,7 @@ export default {
pOption: {} pOption: {}
} }
}, },
created() {
this.pOption = this.element.videoLinks[this.element.videoLinks.videoType]
this.pOption.height = this.h - (this.curGap * 2)
},
computed: { computed: {
moveFlag() { moveFlag() {
return (this.element.optStatus.dragging || this.element.optStatus.resizing) return (this.element.optStatus.dragging || this.element.optStatus.resizing)
...@@ -86,6 +83,10 @@ export default { ...@@ -86,6 +83,10 @@ export default {
'canvasStyleData' 'canvasStyleData'
]) ])
}, },
created() {
this.pOption = this.element.videoLinks[this.element.videoLinks.videoType]
this.pOption.height = this.h - (this.curGap * 2)
},
mounted() { mounted() {
}, },
methods: { methods: {
......
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
required: false, required: false,
default: false default: false
}, },
// eslint-disable-next-line vue/require-default-prop
componentIndex: { componentIndex: {
type: Number, type: Number,
required: false required: false
......
...@@ -165,7 +165,7 @@ span{ ...@@ -165,7 +165,7 @@ span{
.union-header-operator{ .union-header-operator{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end; justify-content: flex-end;
} }
.union-selector{ .union-selector{
display: inline-block; display: inline-block;
......
...@@ -27,6 +27,7 @@ import { pdfTemplateReplaceAll } from '@/utils/StringUtils.js' ...@@ -27,6 +27,7 @@ import { pdfTemplateReplaceAll } from '@/utils/StringUtils.js'
export default { export default {
name: 'PDFPreExport', name: 'PDFPreExport',
props: { props: {
// eslint-disable-next-line vue/require-default-prop
panelName: { panelName: {
type: String, type: String,
required: false required: false
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<el-row class="panel-design-preview"> <el-row class="panel-design-preview">
<div id="imageWrapper" ref="imageWrapper" style="width: 100%;height: 100%"> <div id="imageWrapper" ref="imageWrapper" style="width: 100%;height: 100%">
<fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="fullscreen"> <fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="fullscreen">
<Preview v-if="showMain" :in-screen="!fullscreen" :show-type="'width'" :screen-shot="dataLoading"/> <Preview v-if="showMain" :in-screen="!fullscreen" :show-type="'width'" :screen-shot="dataLoading" />
</fullscreen> </fullscreen>
</div> </div>
</el-row> </el-row>
...@@ -134,6 +134,7 @@ export default { ...@@ -134,6 +134,7 @@ export default {
name: 'PanelViewShow', name: 'PanelViewShow',
components: { Preview, SaveToTemplate, PDFPreExport, ShareHead }, components: { Preview, SaveToTemplate, PDFPreExport, ShareHead },
props: { props: {
// eslint-disable-next-line vue/require-default-prop
activeTab: { activeTab: {
type: String, type: String,
required: false required: false
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<span v-if="scope.row.status === 'Underway'" style="color: green"> <span v-if="scope.row.status === 'Underway'" style="color: green">
<el-link type="success" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.underway') }}</el-link> <el-link type="success" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.underway') }}</el-link>
</span> </span>
<span v-if="scope.row.status === 'Stopped'" > <span v-if="scope.row.status === 'Stopped'">
<div style="font-size: 12px">{{ $t('dataset.task.stopped') }}</div> <div style="font-size: 12px">{{ $t('dataset.task.stopped') }}</div>
</span> </span>
<span v-if="scope.row.status === 'Pending'" class="blue-color"> <span v-if="scope.row.status === 'Pending'" class="blue-color">
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<!--添加任务-选择数据集--> <!--添加任务-选择数据集-->
<el-dialog v-dialogDrag :title="$t('dataset.task.create')" :visible="selectDatasetFlag" :show-close="false" width="70%" class="dialog-css" :destroy-on-close="true"> <el-dialog v-dialogDrag :title="$t('dataset.task.create')" :visible="selectDatasetFlag" :show-close="false" width="70%" class="dialog-css" :destroy-on-close="true">
<table-selector privileges="manage" :mode="1" :clearEmptyDir="true" :custom-type="customType" show-mode="datasetTask" @getTable="getTable" /> <table-selector privileges="manage" :mode="1" :clear-empty-dir="true" :custom-type="customType" show-mode="datasetTask" @getTable="getTable" />
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeCreateTask">{{ $t('chart.cancel') }}</el-button> <el-button size="small" @click="closeCreateTask">{{ $t('chart.cancel') }}</el-button>
<el-button type="primary" size="small" :disabled="!table.id" @click="create(undefined)">{{ $t('chart.confirm') }}</el-button> <el-button type="primary" size="small" :disabled="!table.id" @click="create(undefined)">{{ $t('chart.confirm') }}</el-button>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论