style: 🎨 解决eslint报错,给未使用的变量添加_
This commit is contained in:
parent
3a06f5e5bb
commit
b4bf0e05de
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- <a-select v-model="formatValue" :disabled="disabled" :placeholder="placeholder" :allow-clear="clearable" style="width: 190px" @blur="$emit('blur')"> -->
|
||||
<a-select v-model="formatValue" :disabled="disabled" :placeholder="placeholder" :allow-clear="clearable" style="width: 190px">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<div slot="dropdownRender">
|
||||
<div class="quarter">
|
||||
<div class="quarter__header">
|
||||
<span class="quarter__header-icon quarter__header-icon--prev" @mousedown="(e) => e.preventDefault()" @click="year--">
|
||||
|
@ -67,10 +67,14 @@ export default {
|
||||
let baseNum = 0;
|
||||
try {
|
||||
baseNum += num1.toString().split(".")[1].length;
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
try {
|
||||
baseNum += num2.toString().split(".")[1].length;
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
const result = (Number(num1.toString().replace(".", "")) * Number(num2.toString().replace(".", ""))) / Math.pow(10, baseNum);
|
||||
return result;
|
||||
},
|
||||
|
@ -6,7 +6,7 @@ import constants from "@/index/utils/constants";
|
||||
const { sumRecordID, nullValueArr } = constants
|
||||
const { numMulti, numAdd } = amountUtils;
|
||||
|
||||
export function defaultRender(text, row, index) {
|
||||
export function defaultRender(text, row, _index) {
|
||||
if (row.id === sumRecordID) {
|
||||
return text;
|
||||
} else if (nullValueArr.includes(text)) {
|
||||
@ -16,7 +16,7 @@ export function defaultRender(text, row, index) {
|
||||
}
|
||||
}
|
||||
|
||||
export function outsourcingCostRender(text, row, index) {
|
||||
export function outsourcingCostRender(text, row, _index) {
|
||||
if (row.id === sumRecordID) {
|
||||
return text;
|
||||
} else if (nullValueArr.includes(text)) {
|
||||
@ -36,7 +36,7 @@ export function quarterRender(text, row, index) {
|
||||
}
|
||||
}
|
||||
|
||||
export function dateRender(text, row, index) {
|
||||
export function dateRender(text, row, _index) {
|
||||
if (row.id === sumRecordID) {
|
||||
return "";
|
||||
} else if (nullValueArr.includes(text)) {
|
||||
@ -46,7 +46,7 @@ export function dateRender(text, row, index) {
|
||||
}
|
||||
}
|
||||
|
||||
export function timeRender(text, row, index){
|
||||
export function timeRender(text, row, _index){
|
||||
if (row.id === sumRecordID) {
|
||||
return "";
|
||||
} else if (nullValueArr.includes(text)) {
|
||||
@ -56,7 +56,7 @@ export function timeRender(text, row, index){
|
||||
}
|
||||
}
|
||||
|
||||
export function scheduleRender(text, row, index) {
|
||||
export function scheduleRender(_text, row, _index) {
|
||||
if (row.id === sumRecordID) {
|
||||
return "";
|
||||
}else {
|
||||
@ -67,7 +67,7 @@ export function scheduleRender(text, row, index) {
|
||||
}
|
||||
|
||||
export function enlargedScaleRenderFun(enlargedScale) {
|
||||
return (text, row, index) => {
|
||||
return (_text, row, _index) => {
|
||||
if(enlargedScale===1){
|
||||
return `${numAdd(row.inSize, row.outSize)}(${row.inSize}/${row.outSize})`;
|
||||
}else{
|
||||
@ -79,14 +79,14 @@ export function enlargedScaleRenderFun(enlargedScale) {
|
||||
}
|
||||
|
||||
export function enlargedScaleOnlySumRenderFun(enlargedScale) {
|
||||
return (text, row, index) => {
|
||||
return (_text, row, _index) => {
|
||||
const inSize = numMulti(row.inSize, enlargedScale);
|
||||
const outSize = numMulti(row.outSize, enlargedScale);
|
||||
return `${numAdd(inSize, outSize)}`;
|
||||
}
|
||||
}
|
||||
|
||||
export function serialNumberRender(text, row, index) {
|
||||
export function serialNumberRender(_text, row, index) {
|
||||
if (row.id === sumRecordID) {
|
||||
return `合计(${index})`;
|
||||
}else{
|
||||
@ -95,7 +95,7 @@ export function serialNumberRender(text, row, index) {
|
||||
}
|
||||
|
||||
export function enlargedRenderFun(enlargedScale){
|
||||
return (text, row, index) => {
|
||||
return (text, _row, _index) => {
|
||||
if(enlargedScale===1){
|
||||
return nullValueArr.includes(text)? "--" : text;
|
||||
}
|
||||
|
@ -5,7 +5,8 @@ const { numAdd, numMulti } = amountUtils
|
||||
export function genTableSumRecord(records, cols, enlarge) {
|
||||
let initRecord = cols.reduce((obj, col)=>({ ...obj, [col]:0 }),{});
|
||||
const result = records.reduce(
|
||||
(pre, cur, index) => {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
(pre, cur, _index) => {
|
||||
cols.forEach(col=>{
|
||||
pre[col] = numAdd(pre[col], numMulti(enlarge, cur[col]||0));
|
||||
})
|
||||
|
@ -3,7 +3,7 @@ import moment from "moment";
|
||||
export function quarter2Timestamp(quarterStr) {
|
||||
let quarterStartTime, quarterEndTime;
|
||||
if (quarterStr) {
|
||||
const [whole, yearStr, quarterString] = quarterStr.match(/(\d{4})年S(\d)/);
|
||||
const [_whole, yearStr, quarterString] = quarterStr.match(/(\d{4})年S(\d)/);
|
||||
const date = moment(yearStr, "YYYY").quarter(quarterString * 1);
|
||||
quarterStartTime = date.startOf("quarter").valueOf();
|
||||
quarterEndTime = date.endOf("quarter").valueOf();
|
||||
|
@ -119,7 +119,7 @@ export default {
|
||||
},
|
||||
nextStep(){
|
||||
if(this.current===1){
|
||||
const validatePromises = this.teamResourceList.map(({rule,form,teamId})=>{
|
||||
const validatePromises = this.teamResourceList.map(({_rule,_form,teamId})=>{
|
||||
return this.$refs.generate.$refs['additionalRemarkForm'+teamId]?.validate();
|
||||
});
|
||||
Promise.all(validatePromises).then(()=>{ this.current++ }).catch(()=>{});
|
||||
|
Loading…
x
Reference in New Issue
Block a user