|
@@ -14,7 +14,12 @@
|
|
@current-change="dataList"
|
|
@current-change="dataList"
|
|
>
|
|
>
|
|
<template #menu="{ size, row, index }">
|
|
<template #menu="{ size, row, index }">
|
|
- <el-button type="text" size="mini" @click="lookData(row)" v-if="!row.operationIds">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="lookData(row)"
|
|
|
|
+ v-if="!row.operationIds"
|
|
|
|
+ >
|
|
查看
|
|
查看
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
@@ -23,7 +28,7 @@
|
|
link
|
|
link
|
|
size="small"
|
|
size="small"
|
|
@click="doEdit(row, index)"
|
|
@click="doEdit(row, index)"
|
|
- ><i-ep-edit />编辑
|
|
|
|
|
|
+ ><i-ep-edit />编辑
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</avue-crud>
|
|
</avue-crud>
|
|
@@ -46,6 +51,14 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <el-pagination
|
|
|
|
+ background
|
|
|
|
+ :page-size="20"
|
|
|
|
+ :pager-count="8"
|
|
|
|
+ layout="->,prev, pager, next"
|
|
|
|
+ :total="pageTotal"
|
|
|
|
+ @current-change="handlePageChange"
|
|
|
|
+ />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -58,7 +71,7 @@ import {
|
|
useDictionaryStore,
|
|
useDictionaryStore,
|
|
useUserStoreHook,
|
|
useUserStoreHook,
|
|
} from "@/store";
|
|
} from "@/store";
|
|
-import {testData} from "@/api/process/index";
|
|
|
|
|
|
+import { testData } from "@/api/process/index";
|
|
|
|
|
|
// 数据字典相关
|
|
// 数据字典相关
|
|
const { dicts } = useDictionaryStore();
|
|
const { dicts } = useDictionaryStore();
|
|
@@ -78,7 +91,7 @@ const {
|
|
} = useCrud({
|
|
} = useCrud({
|
|
src: "/api/v1/testData/testData",
|
|
src: "/api/v1/testData/testData",
|
|
});
|
|
});
|
|
-const crudRefJSSJ=ref(null);
|
|
|
|
|
|
+const crudRefJSSJ = ref(null);
|
|
const doEdit = (row, index) => {
|
|
const doEdit = (row, index) => {
|
|
crudRefJSSJ.value && crudRefJSSJ.value.rowEdit(row, index);
|
|
crudRefJSSJ.value && crudRefJSSJ.value.rowEdit(row, index);
|
|
};
|
|
};
|
|
@@ -149,27 +162,33 @@ option.value = Object.assign(option.value, {
|
|
],
|
|
],
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+const pageTotal = ref(0);
|
|
|
|
+const currentPage = ref(1);
|
|
|
|
+const selectRow = ref(null);
|
|
|
|
+
|
|
|
|
+const handlePageChange = (val) => {
|
|
|
|
+ currentPage.value = val;
|
|
|
|
+ lookData(selectRow.value);
|
|
|
|
+};
|
|
// 查看相关代码
|
|
// 查看相关代码
|
|
const dialogVisible = ref(false);
|
|
const dialogVisible = ref(false);
|
|
const tableData = ref([]);
|
|
const tableData = ref([]);
|
|
const lookData = (row) => {
|
|
const lookData = (row) => {
|
|
- if(row.testData&&"[]"!==row.testData){
|
|
|
|
- tableData.value = JSON.parse(row.testData);
|
|
|
|
- console.log(tableData.value);
|
|
|
|
- dialogVisible.value = true;
|
|
|
|
- return;
|
|
|
|
|
|
+ selectRow.value = row;
|
|
|
|
+ if (row.testData && "[]" !== row.testData) {
|
|
|
|
+ tableData.value = JSON.parse(row.testData);
|
|
|
|
+ dialogVisible.value = true;
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- testData(row.processId,row.deviceNo).then(
|
|
|
|
- (res)=>{
|
|
|
|
- if(res.code==='200'){
|
|
|
|
- tableData.value = JSON.parse(res.testData);
|
|
|
|
- console.log(tableData.value);
|
|
|
|
- dialogVisible.value = true;
|
|
|
|
- }
|
|
|
|
|
|
+ testData(row.processId, row.deviceNo, currentPage.value.toString()).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ if (res.code === "200") {
|
|
|
|
+ tableData.value = JSON.parse(res.testData);
|
|
|
|
+ pageTotal.value = res.data.total;
|
|
|
|
+ dialogVisible.value = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
|
|
+ );
|
|
};
|
|
};
|
|
|
|
|
|
const handleDialogCancel = () => {
|
|
const handleDialogCancel = () => {
|