97690a4f by yuanbo

增加注释

1 parent 2829098e
......@@ -74,6 +74,10 @@ export default {
}
},
methods: {
/**
* @description: close
* @author: renchao
*/
close () {
this.$emit('close')
}
......
......@@ -96,6 +96,10 @@ export default {
}
},
methods: {
/**
* @description: handleFullscreen
* @author: renchao
*/
handleFullscreen () {
this.fullscreen = !this.fullscreen
if (!this.fullscreen) {
......@@ -104,11 +108,19 @@ export default {
this.scrollerHeight = (window.innerHeight - 120) + 'px'
}
},
/**
* @description: submitForm
* @author: renchao
*/
submitForm () {
if (this.isButton) {
this.$emit('submitForm');
}
},
/**
* @description: closeDialog
* @author: renchao
*/
closeDialog () {
this.key++
this.$emit('input', false)
......
......@@ -52,6 +52,10 @@ export default {
LbRender
},
methods: {
/**
* @description: setColumn
* @author: renchao
*/
setColumn () {
if (this.column.type) {
this.column.renderHeader = forced[this.column.type].renderHeader
......
......@@ -112,15 +112,30 @@ export default {
},
methods: {
// 单选
/**
* @description: 单选
* @param {*} row
* @author: renchao
*/
singleElection (row) {
this.selected = this.data.indexOf(row);
},
/**
* @description: tableRowClassName
* @param {*} row
* @param {*} rowIndex
* @author: renchao
*/
tableRowClassName ({ row, rowIndex }) {
if (rowIndex % 2 === 1) {
return 'interlaced';
}
},
/**
* @description: getHeight
* @author: renchao
*/
getHeight () {
if (!this.heightNumSetting) {
let _this = this
......@@ -137,6 +152,12 @@ export default {
}
}
},
/**
* @description: calcHeightx
* @param {*} value
* @param {*} wappered
* @author: renchao
*/
calcHeightx (value, wappered = true) {
//项目自定义的公共header部分的高度,可忽略
let header = document.querySelector(".from-clues-header").offsetHeight;
......@@ -156,36 +177,91 @@ export default {
}
return res;
},
/**
* @description: clearSelection
* @author: renchao
*/
clearSelection () {
this.$refs.elTable.clearSelection()
},
/**
* @description: toggleRowSelection
* @param {*} row
* @param {*} selected
* @author: renchao
*/
toggleRowSelection (row, selected) {
this.$refs.elTable.toggleRowSelection(row, selected)
},
/**
* @description: toggleAllSelection
* @author: renchao
*/
toggleAllSelection () {
this.$refs.elTable.toggleAllSelection()
},
/**
* @description: toggleRowExpansion
* @param {*} row
* @param {*} expanded
* @author: renchao
*/
toggleRowExpansion (row, expanded) {
this.$refs.elTable.toggleRowExpansion(row, expanded)
},
/**
* @description: setCurrentRow
* @param {*} row
* @author: renchao
*/
setCurrentRow (row) {
this.$refs.elTable.setCurrentRow(row)
},
/**
* @description: clearSort
* @author: renchao
*/
clearSort () {
this.$refs.elTable.clearSort()
},
/**
* @description: clearFilter
* @param {*} columnKey
* @author: renchao
*/
clearFilter (columnKey) {
this.$refs.elTable.clearFilter(columnKey)
},
/**
* @description: doLayout
* @author: renchao
*/
doLayout () {
this.$refs.elTable.doLayout()
},
/**
* @description: sort
* @param {*} prop
* @param {*} order
* @author: renchao
*/
sort (prop, order) {
this.$refs.elTable.sort(prop, order)
},
/**
* @description: paginationCurrentChange
* @param {*} val
* @author: renchao
*/
paginationCurrentChange (val) {
this.$emit('p-current-change', val)
},
/**
* @description: getMergeArr
* @param {*} tableData
* @param {*} merge
* @author: renchao
*/
getMergeArr (tableData, merge) {
if (!merge) return
this.mergeLine = {}
......@@ -208,6 +284,14 @@ export default {
})
})
},
/**
* @description: mergeMethod
* @param {*} row
* @param {*} column
* @param {*} rowIndex
* @param {*} columnIndex
* @author: renchao
*/
mergeMethod ({ row, column, rowIndex, columnIndex }) {
const index = this.merge.indexOf(column.property)
if (index > -1) {
......
......@@ -25,6 +25,12 @@
},
},
methods: {
/**
* @description: hexToRgba
* @param {*} hex
* @param {*} opacity
* @author: renchao
*/
hexToRgba (hex, opacity) {
let rgbaColor = "";
let reg = /^#[\da-f]{6}$/i;
......@@ -35,6 +41,11 @@
}
return rgbaColor;
},
/**
* @description: fontSize
* @param {*} res
* @author: renchao
*/
fontSize (res) {
let docEl = document.documentElement,
clientWidth =
......
......@@ -35,6 +35,10 @@
});
},
methods: {
/**
* @description: dataTrend
* @author: renchao
*/
async dataTrend () {
try {
let { result: res } = await work.dataTrend();
......
......@@ -25,6 +25,10 @@
this.submitViews();
},
methods: {
/**
* @description: submitViews
* @author: renchao
*/
async submitViews () {
try {
let { result: res } = await work.submitViews("A20");
......
<!--
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-04 13:54:34
-->
......@@ -30,6 +30,10 @@
}, 10000) // 10s
},
methods: {
/**
* @description: getDjlxtotal
* @author: renchao
*/
getDjlxtotal () {
return new Promise(async (resolve) => {
try {
......
......@@ -184,6 +184,10 @@
},
methods: {
// 开启定时器
/**
* @description: 开启定时器
* @author: renchao
*/
startInterval () {
const _self = this;
// 应通过接口获取配置时间,暂时写死5s
......@@ -196,6 +200,10 @@
}, time);
},
// 重新随机选中地图区域
/**
* @description: 重新随机选中地图区域
* @author: renchao
*/
reSelectMapRandomArea () {
const length = 9;
this.$nextTick(() => {
......@@ -226,6 +234,10 @@
}
});
},
/**
* @description: handleMapRandomSelect
* @author: renchao
*/
handleMapRandomSelect () {
this.$nextTick(() => {
try {
......
......@@ -27,6 +27,10 @@
}, 10000) // 10s
},
methods: {
/**
* @description: mapViews
* @author: renchao
*/
async mapViews () {
try {
let { result: res } = await work.mapViews("A20");
......
......@@ -39,6 +39,10 @@
});
},
methods: {
/**
* @description: addhousetotal
* @author: renchao
*/
async addhousetotal () {
if (this.cdata == 0) {
this.cdata = [];
......@@ -61,6 +65,11 @@
}
},
// 处理数据方法
/**
* @description: 处理数据方法
* @param {*} delarr
* @author: renchao
*/
setadat (delarr) {
this.cdata = delarr.splice(0, 6);
let sum = 0
......