This commit is contained in:
caozehui
2025-03-24 15:41:53 +08:00
parent f06ca03881
commit e0b1b5907b
6 changed files with 20 additions and 12 deletions

View File

@@ -124,7 +124,8 @@ export namespace CheckData {
SUCCESS = 1, SUCCESS = 1,
FAIL = 2, FAIL = 2,
TIMEOUT = 3, TIMEOUT = 3,
ERRORDATA = 4 ERRORDATA = 4,
NOT_PART_IN_ERROR = 5
} }
export interface DeviceCheckResult { export interface DeviceCheckResult {
@@ -155,7 +156,7 @@ export namespace CheckData {
*/ */
export interface ButtonResult { export interface ButtonResult {
color: ButtonColorEnum color: ButtonColorEnum
icon: 'Minus' | 'Loading' | 'Close' | 'CircleCheckFilled' | 'Link' | 'WarnTriangleFilled' icon: 'More' | 'Loading' | 'Close' | 'CircleCheckFilled' | 'Link' | 'WarnTriangleFilled' | 'Minus'
} }
/** /**

View File

@@ -84,7 +84,7 @@ class RequestHttp {
} }
} }
// 登陆失效 // 登陆失效
if (data.code == ResultEnum.OVERDUE) { if (data.code === ResultEnum.OVERDUE) {
console.log("登陆失效") console.log("登陆失效")
userStore.setAccessToken('') userStore.setAccessToken('')
userStore.setRefreshToken('') userStore.setRefreshToken('')

View File

@@ -4,8 +4,8 @@
export enum ResultEnum { export enum ResultEnum {
SUCCESS = "A0000", SUCCESS = "A0000",
ERROR = 500, ERROR = 500,
ACCESSTOKEN_EXPIRED = 401, ACCESSTOKEN_EXPIRED = "A0024",
OVERDUE = 4001, OVERDUE = "A0025",
TIMEOUT = 30000, TIMEOUT = 30000,
TYPE = "success" TYPE = "success"
} }

View File

@@ -22,6 +22,7 @@
<el-tag type="success" v-if="scope.row.isDataA === 1">符合</el-tag> <el-tag type="success" v-if="scope.row.isDataA === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataA === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataA === 2">不符合</el-tag>
<el-tag type="warning" v-if="scope.row.isDataA === 4">/</el-tag> <el-tag type="warning" v-if="scope.row.isDataA === 4">/</el-tag>
<el-tag type="info" v-if="scope.row.isDataA === 5">-</el-tag>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
@@ -39,6 +40,7 @@
<el-tag type="success" v-if="scope.row.isDataB === 1">符合</el-tag> <el-tag type="success" v-if="scope.row.isDataB === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataB === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataB === 2">不符合</el-tag>
<el-tag type="warning" v-if="scope.row.isDataB === 4">/</el-tag> <el-tag type="warning" v-if="scope.row.isDataB === 4">/</el-tag>
<el-tag type="info" v-if="scope.row.isDataA === 5">-</el-tag>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
@@ -56,6 +58,7 @@
<el-tag type="success" v-if="scope.row.isDataC === 1">符合</el-tag> <el-tag type="success" v-if="scope.row.isDataC === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataC === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataC === 2">不符合</el-tag>
<el-tag type="warning" v-if="scope.row.isDataC === 4">/</el-tag> <el-tag type="warning" v-if="scope.row.isDataC === 4">/</el-tag>
<el-tag type="info" v-if="scope.row.isDataA === 5">-</el-tag>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
@@ -76,6 +79,7 @@
<el-tag type="success" v-if="scope.row.isDataT === 1">符合</el-tag> <el-tag type="success" v-if="scope.row.isDataT === 1">符合</el-tag>
<el-tag type="danger" v-if="scope.row.isDataT === 2">不符合</el-tag> <el-tag type="danger" v-if="scope.row.isDataT === 2">不符合</el-tag>
<el-tag type="warning" v-if="scope.row.isDataT === 4">/</el-tag> <el-tag type="warning" v-if="scope.row.isDataT === 4">/</el-tag>
<el-tag type="info" v-if="scope.row.isDataA === 5">-</el-tag>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -371,7 +371,7 @@ const updateTableData = async () => {
setCheckResultData(resCheckResult) setCheckResultData(resCheckResult)
setRawData(resRawData) setRawData(resRawData)
checkList.length = 0 checkList.length = 0
checkList.push({value: keys1[0], label: resCheckResult.isData === 1 ? `${keys1[0]}` : resCheckResult.isData === 4 ? `${keys1[0]}/` : `${keys1[0]}(不符合)`}) checkList.push({value: keys1[0], label: resCheckResult.isData === 1 ? `${keys1[0]}` : resCheckResult.isData === 4 ? `${keys1[0]}/` : resCheckResult.isData === 5? `${keys1[0]}-`:`${keys1[0]}(不符合)`})
if (currentCheckItem.value == checkList[0].value) { if (currentCheckItem.value == checkList[0].value) {
doCurrentCheckItemUpdate(checkList[0].value) doCurrentCheckItemUpdate(checkList[0].value)
} else { } else {
@@ -383,7 +383,7 @@ const updateTableData = async () => {
let hum = formatHarmNum(key) let hum = formatHarmNum(key)
tempCheckList.push({ tempCheckList.push({
value: key, value: key,
label: value.isData === 1 ? hum : value.isData === 4 ? `${hum}/` : `${hum}(不符合)` label: value.isData === 1 ? `${hum}`: value.isData === 4 ? `${hum}/` : value.isData === 5? `${hum}-`:`${hum}(不符合)`
}) })
} }

View File

@@ -255,7 +255,7 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
for (let j = 0; j < device.chnResult.length; j++) { for (let j = 0; j < device.chnResult.length; j++) {
switch (device.chnResult[j]) { switch (device.chnResult[j]) {
case CheckData.ChnCheckResultEnum.UNKNOWN: case CheckData.ChnCheckResultEnum.UNKNOWN:
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.INFO, icon: 'Minus'}) tempChnBtnResult.push({color: CheckData.ButtonColorEnum.INFO, icon: 'More'})
break; break;
case CheckData.ChnCheckResultEnum.LOADING: case CheckData.ChnCheckResultEnum.LOADING:
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.LOADING, icon: 'Loading'}) tempChnBtnResult.push({color: CheckData.ButtonColorEnum.LOADING, icon: 'Loading'})
@@ -272,6 +272,9 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
case CheckData.ChnCheckResultEnum.ERRORDATA: case CheckData.ChnCheckResultEnum.ERRORDATA:
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'WarnTriangleFilled'}) tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'WarnTriangleFilled'})
break; break;
case CheckData.ChnCheckResultEnum.NOT_PART_IN_ERROR:
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.INFO, icon: 'Minus'})
break;
default: default:
break; break;
} }