sonar qube
This commit is contained in:
@@ -1399,7 +1399,7 @@ export default {
|
||||
...mapActions(ConformanceInputStore, [''])
|
||||
},
|
||||
created() {
|
||||
this.isShowBarOpen = this.conformanceLogCreateCheckId || this.conformanceFilterCreateCheckId ? false : true;
|
||||
this.isShowBarOpen = !(this.conformanceLogCreateCheckId || this.conformanceFilterCreateCheckId);
|
||||
// 選取 list 的結果
|
||||
this.$emitter.on('actListData', (data) => {
|
||||
this.selectConformanceTask = data;
|
||||
|
||||
@@ -502,6 +502,7 @@ export async function leaveAccountManagementToRemind(){
|
||||
}
|
||||
});
|
||||
if(result.isConfirmed) {
|
||||
return;
|
||||
} else {
|
||||
modalStore.openModal();
|
||||
}
|
||||
|
||||
@@ -26,11 +26,23 @@ export function setLineChartData(baseData, xMax, xMin, isPercent, yMax, yMin) {
|
||||
let e = 2;
|
||||
let f = baseData[1].y;
|
||||
b = (e*d - a*d - f*a - f*c) / (e - c - a)
|
||||
if(isPercent) {
|
||||
b = b >= 1 ? 1 : b <= 0 ? 0 : b;
|
||||
if(isPercent) { // sonar-qube
|
||||
if (b >= 1) {
|
||||
b = 1;
|
||||
} else if (b <= 0) {
|
||||
b = 0;
|
||||
} else {
|
||||
b = b;
|
||||
}
|
||||
}
|
||||
else {
|
||||
b = b >= yMax ? yMax : b <= yMin ? yMin : b;
|
||||
if (b >= yMax) {
|
||||
b = yMax;
|
||||
} else if (b <= yMin) {
|
||||
b = yMin;
|
||||
} else {
|
||||
b = b;
|
||||
}
|
||||
}
|
||||
|
||||
// y 軸最大值
|
||||
@@ -41,17 +53,16 @@ export function setLineChartData(baseData, xMax, xMin, isPercent, yMax, yMin) {
|
||||
let me = 11;
|
||||
let mf;
|
||||
mf = (mb*me - mb*mc -md*me + md*ma) / (ma - mc);
|
||||
if(isPercent) {
|
||||
mf = mf >= 1 ? 1 : mf <= 0 ? 0 : mf;
|
||||
if (isPercent) {
|
||||
if (mf >= 1) {
|
||||
mf = 1;
|
||||
} else if (mf <= 0) {
|
||||
mf = 0;
|
||||
}
|
||||
else {
|
||||
if (mf >= yMax) {
|
||||
} else if (mf >= yMax) {
|
||||
mf = yMax;
|
||||
} else if (mf <= yMin) {
|
||||
mf = yMin;
|
||||
} else {
|
||||
mf = mf;
|
||||
}
|
||||
}
|
||||
|
||||
// 添加最小值
|
||||
|
||||
@@ -234,7 +234,6 @@ export function getDateLabelByMinMaxDate(date, maxDate, minDate) {
|
||||
// 計算相差的小時、分鐘、秒
|
||||
const diffHours = Math.floor(timeDiff / (60 * 60));
|
||||
const diffMinutes = Math.floor(timeDiff / 60);
|
||||
const diffSeconds = Math.floor(timeDiff);
|
||||
|
||||
// 顯示結果
|
||||
if (diffMonths > 1) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
'text-[#FF3366]': !isAccountUnique,
|
||||
'border-[#FF3366]': !isAccountUnique,
|
||||
}"
|
||||
@focus="onInputAccountFocus" :readonly="!isEditable"
|
||||
:readonly="!isEditable"
|
||||
@dblclick="onInputDoubleClick"
|
||||
/>
|
||||
<div v-show="!isAccountUnique" class="error-wrapper my-2">
|
||||
@@ -57,7 +57,7 @@
|
||||
<input id="input_first_pwd" class="outline-none p-1 w-[352px]" :type="isPwdEyeOn ? 'text' : 'password'"
|
||||
v-model="inputPwd" :readonly="!isEditable" @dblclick="onInputDoubleClick"/>
|
||||
<img v-if="isPwdEyeOn" src='@/assets/icon-eye-open.svg' class="absolute right-[8px] cursor-pointer"
|
||||
@click="togglePwdEyeBtn"/>
|
||||
@click="togglePwdEyeBtn" alt=""/>
|
||||
<img v-else src='@/assets/icon-eye-hide.svg' class="absolute right-[8px] cursor-pointer" @click="togglePwdEyeBtn" alt="eye"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -143,7 +143,6 @@ import { useModalStore } from '@/stores/modal.js';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useToast } from 'vue-toast-notification';
|
||||
import useAcctMgmtStore from '@/stores/acctMgmt';
|
||||
import useLoginStore from '@/stores/login';
|
||||
import ModalHeader from "./ModalHeader.vue";
|
||||
import IconChecked from "@/components/icons/IconChecked.vue";
|
||||
import { MODAL_CREATE_NEW, MODAL_ACCT_EDIT, } from '@/constants/constants.js';
|
||||
@@ -280,19 +279,6 @@ export default defineComponent({
|
||||
isSetActivedChecked.value = !isSetActivedChecked.value;
|
||||
}
|
||||
}
|
||||
const onInputAccountFocus = async() => {
|
||||
// if(!isAccountUnique.value) {
|
||||
// // 之所以要轉回true,是為了讓使用者可以繼續填寫不被阻擋
|
||||
// isAccountUnique.value = true;
|
||||
// }
|
||||
// if(isConfirmDisabled.value){
|
||||
// // 所有欄位都要填寫,confirm按鈕才可點選
|
||||
// if(validateInputLengthAndEquality(inputUserAccount.value, inputName.value, inputPwd.value, inputConfirmPwd.value, isPwdMatched.value)
|
||||
// ){
|
||||
// isConfirmDisabled.value = false;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
const onInputNameFocus = () => {
|
||||
if(isConfirmDisabled.value){
|
||||
@@ -350,7 +336,6 @@ export default defineComponent({
|
||||
MODAL_CREATE_NEW,
|
||||
modalTitle,
|
||||
isAccountUnique,
|
||||
onInputAccountFocus,
|
||||
isEditable,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -638,9 +638,7 @@ console.log("TODO:", datasetsPrimary, )
|
||||
default:
|
||||
primeVueSetOption.scales.x.ticks.precision = 0; // x 軸顯示小數點後 0 位
|
||||
primeVueSetOption.plugins.tooltip.callbacks.label = function(context) {
|
||||
let value = context.parsed.y;
|
||||
|
||||
value = context.parsed.x === null ? "n/a" : context.parsed.x;
|
||||
let value = context.parsed.x === null ? "n/a" : context.parsed.x;
|
||||
switch (context.datasetIndex) {
|
||||
case 0: // Primary
|
||||
return `${labelPrimary}: ${value}`;
|
||||
@@ -923,9 +921,6 @@ console.log("TODO:", datasetsPrimary, )
|
||||
* @param { string } xUnit x 軸單位
|
||||
*/
|
||||
getCaseByTaskHorizontalBarChart(chartData, content, isSingle, xUnit = 'count') {
|
||||
const maxX = chartData.x_axis.max;
|
||||
const getSimpleTimeLabel = simpleTimeLabel;
|
||||
const getFollowTimeLabel = followTimeLabel;
|
||||
const labelPrimary = chartData.data[0].label;
|
||||
const labelSecondary = chartData.data[1].label;
|
||||
let primeVueSetData = {};
|
||||
@@ -1042,13 +1037,12 @@ console.log("TODO:", datasetsPrimary, )
|
||||
},
|
||||
};
|
||||
switch (xUnit) {
|
||||
case 'dummy':
|
||||
case 'count':
|
||||
default:
|
||||
primeVueSetOption.scales.x.ticks.precision = 0; // x 軸顯示小數點後 0 位
|
||||
primeVueSetOption.plugins.tooltip.callbacks.label = function(context) {
|
||||
let value = context.parsed.y;
|
||||
|
||||
value = context.parsed.x === null ? "n/a" : context.parsed.x;
|
||||
let value = context.parsed.x === null ? "n/a" : context.parsed.x;
|
||||
switch (context.datasetIndex) {
|
||||
case 0: // Primary
|
||||
return `${labelPrimary}: ${value}`;
|
||||
@@ -1215,9 +1209,7 @@ console.log("TODO:", datasetsPrimary, )
|
||||
case 'date':
|
||||
default:
|
||||
primeVueSetOption.plugins.tooltip.callbacks.label = function(context) {
|
||||
let value = context.parsed.y;
|
||||
|
||||
value = context.parsed.x === null ? "n/a" : getSimpleTimeLabel(context.parsed.x, 2);
|
||||
let value = context.parsed.x === null ? "n/a" : getSimpleTimeLabel(context.parsed.x, 2);
|
||||
switch (context.datasetIndex) {
|
||||
case 0: // Primary
|
||||
return `${labelPrimary}: ${value}`;
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Moment from 'moment';
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import {
|
||||
setTimeStringFormatBaseOnTimeDifference,
|
||||
mapTimestampToAxisTicksByFormat,
|
||||
|
||||
@@ -487,6 +487,7 @@ export default {
|
||||
};
|
||||
break;
|
||||
case 'count':
|
||||
default:
|
||||
primeVueSetOption.scales.x.ticks.precision = 0; // x 軸顯示小數點後 0 位
|
||||
primeVueSetOption.plugins.tooltip.callbacks.label = function(context) {
|
||||
return `${content.x}: ${context.parsed.x}`;
|
||||
|
||||
Reference in New Issue
Block a user