|
@@ -42,63 +42,52 @@
|
|
<div class="line-between-divs"></div>
|
|
<div class="line-between-divs"></div>
|
|
<div class="model_table">
|
|
<div class="model_table">
|
|
<el-table class="info-table" :data="modelShowData" @row-click="showDetail" stripe border style="width: 100%">
|
|
<el-table class="info-table" :data="modelShowData" @row-click="showDetail" stripe border style="width: 100%">
|
|
- <el-table-column align="center" label="模型名称" :width="200">
|
|
|
|
|
|
+ <el-table-column align="center" label="模型名称" >
|
|
<template v-slot="{row}">
|
|
<template v-slot="{row}">
|
|
<span
|
|
<span
|
|
>{{ row.modelName }}</span>
|
|
>{{ row.modelName }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" label="模型编号" :width="150">
|
|
|
|
|
|
+ <el-table-column align="center" label="模型编号" >
|
|
<template v-slot="{row}">
|
|
<template v-slot="{row}">
|
|
<span>{{ row.modelNo }}</span>
|
|
<span>{{ row.modelNo }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" label="状态" :width="120">
|
|
|
|
|
|
+ <el-table-column align="center" label="状态" >
|
|
<template v-slot="{row}">
|
|
<template v-slot="{row}">
|
|
<span>{{ row.status }}</span>
|
|
<span>{{ row.status }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" label="模型类型" :width="200">
|
|
|
|
|
|
+ <el-table-column align="center" label="模型类型" >
|
|
<template v-slot="{row}">
|
|
<template v-slot="{row}">
|
|
<span>{{ type_list[row.modelType] }}</span>
|
|
<span>{{ type_list[row.modelType] }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" label="创建时间" :width="250">
|
|
|
|
|
|
+ <el-table-column align="center" prop="date" label="创建时间" >
|
|
<template v-slot="{row}">
|
|
<template v-slot="{row}">
|
|
<span>{{ row.createTime }}</span>
|
|
<span>{{ row.createTime }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" label="操作" :width="150">
|
|
|
|
|
|
+ <el-table-column align="center" label="操作" >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
-
|
|
|
|
- class="red"
|
|
|
|
- @click.stop="edit(scope, scope.row)"
|
|
|
|
- >编辑
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- class="red"
|
|
|
|
- @click.stop="modelDelet(scope, scope.row)"
|
|
|
|
- >删除
|
|
|
|
- </el-button>
|
|
|
|
|
|
+ <el-button size="mini" type="primary" @click.stop="edit(scope, scope.row)">编辑</el-button>
|
|
|
|
+ <el-button size="mini" type="danger" @click.stop="modelDelet(scope, scope.row)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
<el-pagination background
|
|
<el-pagination background
|
|
- @size-change="handleSizeChange"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :current-page="currentPage"
|
|
|
|
- :page-sizes="[10, 20, 30, 40]"
|
|
|
|
- :page-size="pageSize"
|
|
|
|
- layout="total,jumper,prev, pager, next,sizes"
|
|
|
|
- :total="totalRows"
|
|
|
|
- ></el-pagination>
|
|
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ :page-size="pagesize"
|
|
|
|
+ :page-sizes="[5,10,15]"
|
|
|
|
+ layout="total,jumper,prev, pager, next,sizes"
|
|
|
|
+ :total=totalSize>
|
|
|
|
+ </el-pagination>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<el-dialog
|
|
<el-dialog
|
|
@@ -133,16 +122,16 @@ export default {
|
|
name: "userinfo",
|
|
name: "userinfo",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- userName: "",
|
|
|
|
- nickName: "",
|
|
|
|
- fieldState: "",
|
|
|
|
- fieldData: {},
|
|
|
|
- fieldExist: false,
|
|
|
|
|
|
+ activeKey: 0,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pagesize:10,
|
|
modelShowData: [],
|
|
modelShowData: [],
|
|
modelData: [],
|
|
modelData: [],
|
|
- cooperatorProductData: [],
|
|
|
|
- cooperatorProductShowData: [],
|
|
|
|
- modelExist: false,
|
|
|
|
|
|
+ // userName: "",
|
|
|
|
+ // nickName: "",
|
|
|
|
+ // fieldState: "",
|
|
|
|
+ // fieldData: {},
|
|
|
|
+ // fieldExist: false,
|
|
type_list: [
|
|
type_list: [
|
|
"自定义模型",
|
|
"自定义模型",
|
|
"jar模型",
|
|
"jar模型",
|
|
@@ -168,83 +157,49 @@ export default {
|
|
|
|
|
|
selectedItem: null,
|
|
selectedItem: null,
|
|
rowToDelete:null,
|
|
rowToDelete:null,
|
|
-
|
|
|
|
- currentPage:1,
|
|
|
|
- pageSize:10,
|
|
|
|
- totalRows:0,
|
|
|
|
|
|
+ totalSize:'',
|
|
dialogVisible:false
|
|
dialogVisible:false
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- userInfo().then((res) => {
|
|
|
|
- this.nickName = res.data.nickName;
|
|
|
|
- this.userName = res.data.userName;
|
|
|
|
- // console.log( res.data);
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- // fieldInfo().then((res)=>{
|
|
|
|
- // if(res.data.fieldData)
|
|
|
|
- // {
|
|
|
|
- // this.fieldExist=true;
|
|
|
|
- // this.fieldData = JSON.parse(res.data.fieldData);
|
|
|
|
- // console.log(res.data);
|
|
|
|
- // this.fieldState=res.data.fieldState;
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
|
|
+ // userInfo().then((res) => {
|
|
|
|
+ // this.nickName = res.data.nickName;
|
|
|
|
+ // this.userName = res.data.userName;
|
|
// });
|
|
// });
|
|
-
|
|
|
|
- modelInfo().then((res) => {
|
|
|
|
- if (res.data.modelData) {
|
|
|
|
- this.modelExist = true;
|
|
|
|
- this.modelData = res.data.modelData;
|
|
|
|
- this.loadData();
|
|
|
|
- // this.modelShowData = this.modelData;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- cooperatorProductList(this.currentPage,this.pagesize).then((res) => {
|
|
|
|
- if (res.data.cooperator_Product_List) {
|
|
|
|
- this.cooperatorProductData = res.data.cooperator_Product_List;
|
|
|
|
- console.log(this.cooperatorProductData);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
|
|
+ modelInfo(this.currentPage,this.pagesize).then(res=>
|
|
|
|
+ {
|
|
|
|
+ console.log(this.pageSize);
|
|
|
|
+ this.modelData = res.data.modelData.list;
|
|
|
|
+ this.modelShowData = this.modelData;
|
|
|
|
+ var j = parseInt(res.data.modelData.total);
|
|
|
|
+ this.totalSize = j;
|
|
|
|
+ // console.log(this.modelShowData[0]);
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- loadData() {
|
|
|
|
- // 模拟异步请求数据
|
|
|
|
- setTimeout(() => {
|
|
|
|
- // 根据当前页码和每页显示的数据条数计算起始索引和结束索引
|
|
|
|
- const startIndex = (this.currentPage - 1) * this.pageSize;
|
|
|
|
- const endIndex = startIndex + this.pageSize;
|
|
|
|
- // 截取指定范围的数据
|
|
|
|
- const data = this.modelData.slice(startIndex, endIndex);
|
|
|
|
- this.modelShowData = data;
|
|
|
|
- this.totalRows = this.modelData.length;
|
|
|
|
- }, 500);
|
|
|
|
|
|
+ handleCurrentChange:function(currentPage) {
|
|
|
|
+ // 当前页码发生变化时触发
|
|
|
|
+ this.currentPage=currentPage;
|
|
|
|
+ modelInfo(this.currentPage,this.pagesize).then(res=>
|
|
|
|
+ {
|
|
|
|
+ this.modelData = res.data.modelData.list;
|
|
|
|
+ this.modelShowData = this.modelData;
|
|
|
|
+ }
|
|
|
|
+ )
|
|
},
|
|
},
|
|
- handleSizeChange(size) {
|
|
|
|
|
|
+ handleSizeChange:function(size){
|
|
// 每页显示的数据条数发生变化时触发
|
|
// 每页显示的数据条数发生变化时触发
|
|
this.pageSize = size;
|
|
this.pageSize = size;
|
|
- this.currentPage = 1; // 重置当前页码为第一页
|
|
|
|
- this.loadData();
|
|
|
|
- },
|
|
|
|
- handleCurrentChange(page) {
|
|
|
|
- // 当前页码发生变化时触发
|
|
|
|
- this.currentPage = page;
|
|
|
|
- this.loadData();
|
|
|
|
|
|
+ modelInfo(this.currentPage,this.pagesize).then(res=>
|
|
|
|
+ {
|
|
|
|
+ this.modelData = res.data.modelData.list;
|
|
|
|
+ this.modelShowData = this.modelData;
|
|
|
|
+ }
|
|
|
|
+ )
|
|
},
|
|
},
|
|
showDetail(row) {
|
|
showDetail(row) {
|
|
this.selectedItem = row;
|
|
this.selectedItem = row;
|
|
- this.cooperatorProductShowData=this.cooperatorProductData.filter(item => {
|
|
|
|
- const modelIdMatch = item.modelId==row.modelNo;
|
|
|
|
- console.log(item);
|
|
|
|
- console.log(row.modelNo);
|
|
|
|
- // return true;
|
|
|
|
- return modelIdMatch;
|
|
|
|
- });
|
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/modelInfo',
|
|
path: '/modelInfo',
|
|
query: {
|
|
query: {
|