63306c7d by yuanbo

增加注释

1 parent 3fdfccc8
......@@ -69,6 +69,10 @@
}
},
methods: {
/**
* @description: close
* @author: renchao
*/
close () {
this.$emit('close')
}
......
......@@ -91,6 +91,10 @@ export default {
}
},
methods: {
/**
* @description: handleFullscreen
* @author: renchao
*/
handleFullscreen () {
this.fullscreen = !this.fullscreen
if (!this.fullscreen) {
......@@ -99,11 +103,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 =
......
......@@ -30,6 +30,10 @@ export default {
this.dataTrend()
},
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");
......
......@@ -22,6 +22,10 @@ export default {
this.getDjlxtotal();
},
methods: {
/**
* @description: getDjlxtotal
* @author: renchao
*/
getDjlxtotal () {
return new Promise(async (resolve) => {
try {
......
......@@ -176,6 +176,10 @@ export default {
},
methods: {
// 开启定时器
/**
* @description: 开启定时器
* @author: renchao
*/
startInterval () {
const _self = this;
// 应通过接口获取配置时间,暂时写死5s
......@@ -188,6 +192,10 @@ export default {
}, time);
},
// 重新随机选中地图区域
/**
* @description: 重新随机选中地图区域
* @author: renchao
*/
reSelectMapRandomArea () {
const length = 9;
this.$nextTick(() => {
......@@ -218,6 +226,10 @@ export default {
}
});
},
/**
* @description: handleMapRandomSelect
* @author: renchao
*/
handleMapRandomSelect () {
this.$nextTick(() => {
try {
......
<!--
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-04-03 13:40:18
-->
......@@ -23,6 +23,10 @@ export default {
this.mapViews();
},
methods: {
/**
* @description: mapViews
* @author: renchao
*/
async mapViews () {
try {
let { result: res } = await work.mapViews("A20");
......
......@@ -34,6 +34,10 @@
},
methods: {
/**
* @description: addhousetotal
* @author: renchao
*/
async addhousetotal () {
if (this.cdata == 0) {
this.cdata = [];
......@@ -57,6 +61,11 @@
},
// 处理数据方法
/**
* @description: 处理数据方法
* @param {*} delarr
* @author: renchao
*/
setadat (delarr) {
this.cdata = delarr.splice(0, 6);
......