|
@@ -4,25 +4,22 @@
|
|
|
<!-- 拷机计划 -->
|
|
|
<el-col :span="7" :xs="24" min-width="500px">
|
|
|
<el-card class="box-card">
|
|
|
- <template #header>
|
|
|
- <svg-icon color="#333" icon-class="education" />
|
|
|
- 拷机计划
|
|
|
- </template>
|
|
|
- <el-form ref="queryFormRef" :model="queryParams">
|
|
|
+ <template #header> 拷机计划 </template>
|
|
|
+ <el-form ref="queryFormRef" :model="tcheckParams">
|
|
|
<el-form-item label="拷机计划:">
|
|
|
- <el-input v-model="queryParams.checkName" placeholder="拷机计划名称" width="120px" />
|
|
|
+ <el-input v-model="tcheckParams.checkName" placeholder="拷机计划名称" width="120px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" class="button" :disabled="state.search_disabled" @click="queryList">
|
|
|
查询计划
|
|
|
</el-button>
|
|
|
- <el-button type="primary" class="button" @click="handleAddTCheck" style="margin-left:10px">新增计划
|
|
|
+ <el-button type="primary" class="button" @click="handleAddTCheck" style="margin-left: 10px">新增计划
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table v-loading="loading" :data="state.tcheck_tableData" border stripe style="width: 100%"
|
|
|
:height="tcheck_tableHeight" highlight-current-row @current-change="handleCurrentRowChange"
|
|
|
- @row-click="handleRowClick" :header-cell-style="{ background: '#606266', color: '#FFFFFF' }"
|
|
|
+ @row-click="handleTCheckRowClick" :header-cell-style="{ background: '#606266', color: '#FFFFFF' }"
|
|
|
:show-header="false">
|
|
|
<el-table-column fixed type="index" width="50" align="center" />
|
|
|
<el-table-column fixed fit prop="checkName" header-align="center" min-width="120" />
|
|
@@ -55,9 +52,15 @@
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="结束时间" span="2">{{ stringTodate(scope.row.endTime) }}
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="计划时长">{{ scope.row.checkDays }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="上传间隔">{{ scope.row.checkIntverl }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="拷机数量">{{ scope.row.checkDeviceNum }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="计划时长">{{
|
|
|
+ scope.row.checkDays
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="上传间隔">{{
|
|
|
+ scope.row.checkIntverl
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="拷机数量">{{
|
|
|
+ scope.row.checkDeviceNum
|
|
|
+ }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="计划状态">{{ isNull(scope.row.startTime) ? "未开始" : "拷机中" }}
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
@@ -66,9 +69,9 @@
|
|
|
</el-table>
|
|
|
|
|
|
<el-config-provider :locale="locale">
|
|
|
- <el-pagination v-model:currentPage="queryParams.page" v-model:page-size="queryParams.rows"
|
|
|
+ <el-pagination v-model:currentPage="tcheckParams.page" v-model:page-size="tcheckParams.rows"
|
|
|
:page-sizes="[10, 15, 20, 25, 100]" :small="state.small" :disabled="state.disabled"
|
|
|
- :background="state.background" layout="total, sizes, prev, pager, next" :total="state.total"
|
|
|
+ :background="state.background" layout="total, sizes, prev, pager, next" :total="state.tcheck_total"
|
|
|
style="text-align: center; margin-top: 10px; height: 30px" @size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange" />
|
|
|
</el-config-provider>
|
|
@@ -78,62 +81,57 @@
|
|
|
<el-col :span="17" :xs="24">
|
|
|
<el-card class="box-card">
|
|
|
<template #header>
|
|
|
- <svg-icon color="#333" icon-class="education" />
|
|
|
拷机详情-{{ state.select_tcheck.checkName }}
|
|
|
</template>
|
|
|
<el-row>
|
|
|
<el-table v-loading="loading" :data="state.tcheckdetail_tableData" border stripe style="width: 100%"
|
|
|
:height="300" highlight-current-row @current-change="handleCurrentRowChange"
|
|
|
- :header-cell-style="{ background: '#606266', color: '#FFFFFF' }">
|
|
|
+ @row-click="handleTCheckDetailRowClick" :header-cell-style="{ background: '#606266', color: '#FFFFFF' }">
|
|
|
<el-table-column fixed type="index" width="50" align="center" />
|
|
|
<el-table-column fixed prop="deviceSn" label="设备SN" header-align="center" width="120" />
|
|
|
- <el-table-column label="位置信息" header-align="center" width="100">
|
|
|
- <template #default="scope">
|
|
|
- <el-space direction="vertical" alignment="start" :size="5">
|
|
|
- <el-tag>工装:<span style="color: blue; font-size: large">{{
|
|
|
- scope.row.cehckDays
|
|
|
- }}</span></el-tag>
|
|
|
- <el-tag>工位:<span style="color: green; font-size: large">{{
|
|
|
- scope.row.checkIntverl
|
|
|
- }}</span>
|
|
|
- </el-tag>
|
|
|
- </el-space>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column fixed prop="cellId" label="工位" header-align="center" width="120" />
|
|
|
<el-table-column label="拷机参数" header-align="center" width="120">
|
|
|
<template #default="scope">
|
|
|
<el-space direction="vertical" alignment="start" :size="5">
|
|
|
- <el-tag><span style="color: blue;">{{
|
|
|
- scope.row.cellStaticFlag == 1 ? "静态工装" : "非静态工装"
|
|
|
+ <el-tag><span style="color: blue">{{
|
|
|
+ scope.row.cellStaticFlag == 1
|
|
|
+ ? "静态工装"
|
|
|
+ : "非静态工装"
|
|
|
}}</span></el-tag>
|
|
|
- <el-tag>标准值:<span style="color: green; ">{{
|
|
|
+ <el-tag>标准值:<span style="color: green">{{
|
|
|
scope.row.stdValue
|
|
|
- }}</span> </el-tag>
|
|
|
+ }}</span>
|
|
|
+ </el-tag>
|
|
|
</el-space>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="当前状态" header-align="center" width="140">
|
|
|
<template #default="scope">
|
|
|
<el-space direction="vertical" alignment="start" :size="5">
|
|
|
- <el-tag>总数:<span style="color: blue;">{{
|
|
|
- scope.row.realRevNum
|
|
|
+ <el-tag>总数:<span style="color: blue">{{
|
|
|
+ scope.row.revAllNum
|
|
|
}}</span></el-tag>
|
|
|
- <el-tag>应收:<span style="color: green;">{{
|
|
|
+ <el-tag>应收:<span style="color: green">{{
|
|
|
scope.row.mustRevNum
|
|
|
- }}</span> </el-tag>
|
|
|
- <el-tag>实收:<span style="color: orange; ">{{
|
|
|
+ }}</span>
|
|
|
+ </el-tag>
|
|
|
+ <el-tag>实收:<span style="color: orange">{{
|
|
|
scope.row.realRevNum
|
|
|
}}</span>
|
|
|
</el-tag>
|
|
|
</el-space>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column fit label="下次接收时间" header-align="center" min-width="120" />
|
|
|
+ <el-table-column fit prop="nextRevTime" label="下次接收时间" header-align="center" min-width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ stringTodate(scope.row.startTime) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-row>
|
|
|
|
|
|
<el-row justify="center">
|
|
|
- <el-table v-loading="loading" :data="state.tcheck_tableData" border stripe style="width: 100%;"
|
|
|
+ <el-table v-loading="loading" :data="state.tcheck_tableData" border stripe style="width: 100%"
|
|
|
highlight-current-row @current-change="handleCurrentRowChange" :height="data_tableHeight"
|
|
|
:header-cell-style="{ background: '#606266', color: '#FFFFFF' }">
|
|
|
<el-table-column fixed type="index" width="50" align="center" />
|
|
@@ -145,11 +143,11 @@
|
|
|
</el-table>
|
|
|
|
|
|
<el-config-provider :locale="locale">
|
|
|
- <el-pagination v-model:currentPage="queryParams.page" v-model:page-size="queryParams.rows"
|
|
|
+ <el-pagination v-model:currentPage="tcheckParams.page" v-model:page-size="tcheckParams.rows"
|
|
|
:page-sizes="[10, 15, 20, 25, 100]" :small="state.small" :disabled="state.disabled"
|
|
|
- :background="state.background" layout="total, sizes, prev, pager, next, jumper" :total="state.total"
|
|
|
- style="text-align: center; margin-top: 10px; height: 30px" @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange" />
|
|
|
+ :background="state.background" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="state.tairead_total" style="text-align: center; margin-top: 10px; height: 30px"
|
|
|
+ @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
</el-config-provider>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
@@ -182,7 +180,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工装选择:">
|
|
|
<el-select v-model="tcheckdetail_formData.chkpaltId" class="filter-item" placeholder="工装选择"
|
|
|
- style="width: 300px;">
|
|
|
+ style="width: 300px">
|
|
|
<el-option v-for="item in DicChkplatData" :key="item.platId" :label="item.platName" :value="item.platId" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -207,9 +205,21 @@ import { ElForm, ElMessage, ElMessageBox } from "element-plus";
|
|
|
import TCheckAction from "@/api/qualitymanagement/tcheck";
|
|
|
import DicChkplatAction from "@/api/systemdictionary/dicchkplat";
|
|
|
import TCheckDetailAction from "@/api/qualitymanagement/tcheckdetail";
|
|
|
+import TAireadAction from "@/api/tairead";
|
|
|
import DeviceAction from "@/api/deviceacc";
|
|
|
-import { TCheckQueryParam, TCheckModel, TCheckDetailModel, TCheckFzModel, DicChkplatModel, Dialog, PageResult, DeviceAccQueryParam } from "@/types";
|
|
|
-import Moment from 'moment'
|
|
|
+import {
|
|
|
+ TCheckQueryParam,
|
|
|
+ TCheckModel,
|
|
|
+ TCheckDetailModel,
|
|
|
+ TCheckFzModel,
|
|
|
+ DicChkplatModel,
|
|
|
+ TAireadModel,
|
|
|
+ TAireadQueryParam,
|
|
|
+ Dialog,
|
|
|
+ PageResult,
|
|
|
+ DeviceAccQueryParam,
|
|
|
+} from "@/types";
|
|
|
+import Moment from "moment";
|
|
|
import zhCn from "element-plus/lib/locale/lang/zh-cn";
|
|
|
|
|
|
let locale = ref(zhCn);
|
|
@@ -227,10 +237,13 @@ const loading = ref(false);
|
|
|
const state = reactive({
|
|
|
search_disabled: false,
|
|
|
select_tcheck: {} as TCheckModel,
|
|
|
+ select_tcheckdetail: {} as TCheckDetailModel,
|
|
|
currentType: 0, //val =0 计划新增 =1 计划编辑 =2 明细新增 =3 明细编辑
|
|
|
- queryParams: { page: 1, rows: 10 } as TCheckQueryParam,
|
|
|
+ tcheckParams: { page: 1, rows: 10 } as TCheckQueryParam,
|
|
|
deviceParams: { page: 1, rows: 10 } as DeviceAccQueryParam,
|
|
|
- total: 0,
|
|
|
+ taireadParams: { page: 1, rows: 10 } as TAireadQueryParam,
|
|
|
+ tcheck_total: 0,
|
|
|
+ tairead_total: 0,
|
|
|
small: false,
|
|
|
background: false,
|
|
|
disabled: false,
|
|
@@ -241,30 +254,43 @@ const state = reactive({
|
|
|
RoleStateMap,
|
|
|
tcheck_tableData: [] as TCheckModel[],
|
|
|
tcheckdetail_tableData: [] as TCheckDetailModel[],
|
|
|
+ tairead_tableData: [] as TAireadModel[],
|
|
|
DicChkplatData: [] as DicChkplatModel[],
|
|
|
});
|
|
|
|
|
|
-const { queryParams, deviceParams, tcheck_dialog, tcheck_formData, tcheckdetail_dialog, tcheckdetail_formData, tcheck_tableData, tcheckdetail_tableData, DicChkplatData } =
|
|
|
- toRefs(state);
|
|
|
+const {
|
|
|
+ tcheckParams,
|
|
|
+ deviceParams,
|
|
|
+ taireadParams,
|
|
|
+ tcheck_dialog,
|
|
|
+ tcheck_formData,
|
|
|
+ tcheckdetail_dialog,
|
|
|
+ tcheckdetail_formData,
|
|
|
+ tcheck_tableData,
|
|
|
+ tcheckdetail_tableData,
|
|
|
+ tairead_tableData,
|
|
|
+ DicChkplatData,
|
|
|
+} = toRefs(state);
|
|
|
|
|
|
const tcheck_tableHeight = ref(document.documentElement.clientHeight - 440);
|
|
|
-const data_tableHeight = ref(document.documentElement.clientHeight - 275 - 20 - 320);
|
|
|
+const data_tableHeight = ref(
|
|
|
+ document.documentElement.clientHeight - 275 - 20 - 320
|
|
|
+);
|
|
|
|
|
|
const currentRow = ref();
|
|
|
|
|
|
const isNull = (val: any) => {
|
|
|
if (val) {
|
|
|
return false;
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
return true;
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
const stringTodate = (val: any) => {
|
|
|
if (val) {
|
|
|
console.log(val);
|
|
|
- return Moment(val, "YYYYMMDDHHmmss").format("MM-DD HH:mm");
|
|
|
+ return Moment(val, "YYYYMMDDHHmmss").format("MM-DD HH:mm:ss");
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -272,10 +298,20 @@ const handleCurrentRowChange = (val: TCheckModel | undefined) => {
|
|
|
currentRow.value = val;
|
|
|
};
|
|
|
|
|
|
-const handleRowClick = (row: TCheckModel) => {
|
|
|
+const handleTCheckRowClick = (row: TCheckModel) => {
|
|
|
state.select_tcheck = row;
|
|
|
queryTCheckDetailList();
|
|
|
-}
|
|
|
+};
|
|
|
+
|
|
|
+const handleTCheckDetailRowClick = (row: TCheckDetailModel) => {
|
|
|
+ state.select_tcheckdetail = row;
|
|
|
+ if (!isNull(state.select_tcheckdetail.startTime)) {
|
|
|
+ state.taireadParams.deviceSn = state.select_tcheckdetail.deviceSn;
|
|
|
+ state.taireadParams.startTime = state.select_tcheckdetail.startTime;
|
|
|
+ state.taireadParams.endTime = state.select_tcheckdetail.endTime;
|
|
|
+ queryTAireadList();
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
async function handleAdd(row: TCheckModel) {
|
|
|
await queryDicChkplatList();
|
|
@@ -284,7 +320,7 @@ async function handleAdd(row: TCheckModel) {
|
|
|
state.tcheckdetail_formData.checkId = row.checkId;
|
|
|
state.tcheckdetail_dialog.title = "拷机设备";
|
|
|
state.tcheckdetail_dialog.visible = true;
|
|
|
-};
|
|
|
+}
|
|
|
|
|
|
const handleStart = (row: TCheckModel) => {
|
|
|
TCheckAction.StartTCheck(row.id)
|
|
@@ -339,58 +375,80 @@ const handleEdit = (row: TCheckModel) => {
|
|
|
};
|
|
|
|
|
|
const handleSizeChange = (val: number) => {
|
|
|
- queryParams.value.rows = val;
|
|
|
+ tcheckParams.value.rows = val;
|
|
|
queryList();
|
|
|
};
|
|
|
|
|
|
const handleCurrentChange = (val: number) => {
|
|
|
- queryParams.value.page = val;
|
|
|
+ tcheckParams.value.page = val;
|
|
|
queryList();
|
|
|
};
|
|
|
|
|
|
const queryTCheckDetailList = () => {
|
|
|
- TCheckAction.QueryTCheckDetail(state.select_tcheck.checkId).then(result => {
|
|
|
- if (result.status === 200) {
|
|
|
- const { res, flag, error } = result.data;
|
|
|
- if (flag != undefined && flag == 1) {
|
|
|
- const data = res as TCheckFzModel;
|
|
|
- state.tcheckdetail_tableData = data.detailList;
|
|
|
+ TCheckAction.QueryTCheckDetail(state.select_tcheck.checkId)
|
|
|
+ .then((result) => {
|
|
|
+ if (result.status === 200) {
|
|
|
+ const { res, flag, error } = result.data;
|
|
|
+ if (flag != undefined && flag == 1) {
|
|
|
+ const data = res as TCheckFzModel;
|
|
|
+ state.tcheckdetail_tableData = data.detailList;
|
|
|
+ } else {
|
|
|
+ }
|
|
|
}
|
|
|
- else { }
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- //请求失败时的操作
|
|
|
- console.log(error);
|
|
|
- })
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ //请求失败时的操作
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
-
|
|
|
const queryDicChkplatList = () => {
|
|
|
- DicChkplatAction.QueryDicChkplatList(1, 999).then(result => {
|
|
|
- if (result.status === 200) {
|
|
|
- const { res, flag, error } = result.data;
|
|
|
- if (flag != undefined && flag == 1) {
|
|
|
- const pageData = res as PageResult<DicChkplatModel[]>;
|
|
|
- state.DicChkplatData = pageData.list;
|
|
|
+ DicChkplatAction.QueryDicChkplatList(1, 999)
|
|
|
+ .then((result) => {
|
|
|
+ if (result.status === 200) {
|
|
|
+ const { res, flag, error } = result.data;
|
|
|
+ if (flag != undefined && flag == 1) {
|
|
|
+ const pageData = res as PageResult<DicChkplatModel[]>;
|
|
|
+ state.DicChkplatData = pageData.list;
|
|
|
+ } else {
|
|
|
+ }
|
|
|
}
|
|
|
- else { }
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- //请求失败时的操作
|
|
|
- console.log(error);
|
|
|
- })
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ //请求失败时的操作
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const queryTAireadList = () => {
|
|
|
+ TAireadAction.QueryTAireadList(state.taireadParams)
|
|
|
+ .then((result) => {
|
|
|
+ if (result.status === 200) {
|
|
|
+ const { res, flag, error } = result.data;
|
|
|
+ if (flag != undefined && flag == 1) {
|
|
|
+ const pageData = res as PageResult<DicChkplatModel[]>;
|
|
|
+ state.DicChkplatData = pageData.list;
|
|
|
+ state.tairead_total = pageData.total;
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ //请求失败时的操作
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const queryList = () => {
|
|
|
loading.value = true;
|
|
|
- TCheckAction.QueryTCheckList(state.queryParams)
|
|
|
+ TCheckAction.QueryTCheckList(state.tcheckParams)
|
|
|
.then((result) => {
|
|
|
if (result.status === 200) {
|
|
|
const { res, flag, error } = result.data;
|
|
|
if (flag != undefined && flag == 1) {
|
|
|
const pageData = res as PageResult<TCheckModel[]>;
|
|
|
state.tcheck_tableData = pageData.list;
|
|
|
- state.total = pageData.total;
|
|
|
+ state.tcheck_total = pageData.total;
|
|
|
} else {
|
|
|
}
|
|
|
}
|
|
@@ -405,29 +463,35 @@ const queryList = () => {
|
|
|
const submitForm = () => {
|
|
|
if (state.currentType == 0) {
|
|
|
state.tcheck_formData.createMan = localStorage.getItem("UserName") || "";
|
|
|
- TCheckAction.AddTCheck(state.tcheck_formData).then((result) => {
|
|
|
- ElMessage.success("新增成功");
|
|
|
- }).then(() => {
|
|
|
- cancel();
|
|
|
- queryList();
|
|
|
- });
|
|
|
+ TCheckAction.AddTCheck(state.tcheck_formData)
|
|
|
+ .then((result) => {
|
|
|
+ ElMessage.success("新增成功");
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ cancel();
|
|
|
+ queryList();
|
|
|
+ });
|
|
|
} else if (state.currentType == 1) {
|
|
|
- TCheckAction.EditTCheck(state.tcheck_formData).then((result) => {
|
|
|
- ElMessage.success("编辑成功");
|
|
|
- }).then(() => {
|
|
|
- cancel();
|
|
|
- queryList();
|
|
|
- });
|
|
|
- }
|
|
|
- else if (state.currentType == 2) {
|
|
|
- TCheckDetailAction.AddTCheckDetail(state.tcheckdetail_formData).then((result) => {
|
|
|
- ElMessage.success("新增成功");
|
|
|
- });
|
|
|
- }
|
|
|
- else if (state.currentType == 3) {
|
|
|
- TCheckDetailAction.EditTCheckDetail(state.tcheckdetail_formData).then((result) => {
|
|
|
- ElMessage.success("编辑成功");
|
|
|
- });
|
|
|
+ TCheckAction.EditTCheck(state.tcheck_formData)
|
|
|
+ .then((result) => {
|
|
|
+ ElMessage.success("编辑成功");
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ cancel();
|
|
|
+ queryList();
|
|
|
+ });
|
|
|
+ } else if (state.currentType == 2) {
|
|
|
+ TCheckDetailAction.AddTCheckDetail(state.tcheckdetail_formData).then(
|
|
|
+ (result) => {
|
|
|
+ ElMessage.success("新增成功");
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (state.currentType == 3) {
|
|
|
+ TCheckDetailAction.EditTCheckDetail(state.tcheckdetail_formData).then(
|
|
|
+ (result) => {
|
|
|
+ ElMessage.success("编辑成功");
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -472,38 +536,41 @@ const cancel = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-let timeout: NodeJS.Timeout
|
|
|
-const querySearchAsync = (queryString: string, callback: (arg: any) => void) => {
|
|
|
+let timeout: NodeJS.Timeout;
|
|
|
+const querySearchAsync = (
|
|
|
+ queryString: string,
|
|
|
+ callback: (arg: any) => void
|
|
|
+) => {
|
|
|
if (!isNull(queryString)) {
|
|
|
let queryData = {};
|
|
|
- DeviceAction.QueryDeviceAccList(state.deviceParams).then(result => {
|
|
|
- if (result.status === 200) {
|
|
|
- const { res, flag, error } = result.data;
|
|
|
- if (flag != undefined && flag == 1) {
|
|
|
- queryData = res.list;
|
|
|
- } else {
|
|
|
-
|
|
|
+ DeviceAction.QueryDeviceAccList(state.deviceParams)
|
|
|
+ .then((result) => {
|
|
|
+ if (result.status === 200) {
|
|
|
+ const { res, flag, error } = result.data;
|
|
|
+ if (flag != undefined && flag == 1) {
|
|
|
+ queryData = res.list;
|
|
|
+ } else {
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
- });
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
|
|
|
- clearTimeout(timeout)
|
|
|
+ clearTimeout(timeout);
|
|
|
timeout = setTimeout(() => {
|
|
|
- callback(queryData)
|
|
|
+ callback(queryData);
|
|
|
}, 3000 * Math.random());
|
|
|
}
|
|
|
};
|
|
|
|
|
|
const handleSelect = (item: any) => {
|
|
|
- console.log(item)
|
|
|
+ console.log(item);
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
window.onresize = function () {
|
|
|
tcheck_tableHeight.value = document.documentElement.clientHeight - 440;
|
|
|
- data_tableHeight.value = document.documentElement.clientHeight - 275 - 20 - 320;
|
|
|
+ data_tableHeight.value =
|
|
|
+ document.documentElement.clientHeight - 275 - 20 - 320;
|
|
|
};
|
|
|
|
|
|
queryList();
|