|
@@ -12,10 +12,10 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input v-model="filters.name" placeholder="请输入关键字进行搜索"></el-input>
|
|
|
|
|
|
+ <el-input v-model="filters.name" placeholder="请输入关键字进行搜索" style="width: 300px;" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary">查询</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="getMoulds(filters.name)">查询</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -29,18 +29,19 @@
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
>
|
|
>
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
- <el-table-column prop="number" label="模具编号" width="100" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="name" label="模具类型名称" width="140" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="project" label="所属项目" width="100" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="client" label="客户名称" width="100" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="operation" label="运行次数" width="100" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="averageCycle" label="每模平均周期" width="140" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="power" label="电量" width="80" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="currentState" label="当前状态" width="100" sortable></el-table-column>
|
|
|
|
- <el-table-column prop="lifetime" label="模具寿命" width="100" sortable></el-table-column>
|
|
|
|
- <el-table-column label="模具保养" width="100" sortable>
|
|
|
|
|
|
+ <el-table-column prop="modelNo" label="模具编号" width="100" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="modelName" label="模具名称" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="equipmentNo" label="云模盒编号" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="projectName" label="所属项目" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="factoryName" label="制造工厂" width="140" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="area" label="位置" width="200" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="runTimes" label="运行次数" width="100" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="ocCycle" label="每模平均周期" width="140" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="电量" width="80" sortable></el-table-column>
|
|
|
|
+ <el-table-column prop="state" label="当前状态" width="100" sortable></el-table-column>
|
|
|
|
+ <el-table-column label="模具保养" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <a style="color: #409EFF; cursor: pointer" @click="toMaintenance(scope.row.number)">不需要</a>
|
|
|
|
|
|
+ <a style="color: #409EFF; cursor: pointer" @click="toMaintenance(scope.row.id)">不需要</a>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -65,86 +66,68 @@ import util from "../../common/js/util";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- moulds: [
|
|
|
|
- //临时数据
|
|
|
|
- {
|
|
|
|
- number: "001",
|
|
|
|
- name: "啦啦啦模具",
|
|
|
|
- project: "啦啦计划",
|
|
|
|
- client: "啦啦客户",
|
|
|
|
- operation: "12450",
|
|
|
|
- averageCycle: "114514",
|
|
|
|
- power: "70%",
|
|
|
|
- currentState: "还行",
|
|
|
|
- lifetime: "100",
|
|
|
|
- maintainRequirement: false
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- number: "002",
|
|
|
|
- name: "abc模具",
|
|
|
|
- project: "123计划",
|
|
|
|
- client: "牛逼的客户",
|
|
|
|
- operation: "789",
|
|
|
|
- averageCycle: "101112",
|
|
|
|
- power: "60%",
|
|
|
|
- currentState: "凑合",
|
|
|
|
- lifetime: "120",
|
|
|
|
- maintainRequirement: true
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ moulds: [],
|
|
filters: {
|
|
filters: {
|
|
name: "",
|
|
name: "",
|
|
value: "0"
|
|
value: "0"
|
|
},
|
|
},
|
|
listLoading: false,
|
|
listLoading: false,
|
|
total: 0,
|
|
total: 0,
|
|
- tableHeight: 0
|
|
|
|
|
|
+ tableHeight: 0,
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 20
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//分页
|
|
//分页
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.page = val;
|
|
this.page = val;
|
|
- // this.getMoulds();
|
|
|
|
|
|
+ this.getMoulds();
|
|
},
|
|
},
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
this.size = val;
|
|
this.size = val;
|
|
- // this.getMoulds();
|
|
|
|
|
|
+ this.getMoulds();
|
|
},
|
|
},
|
|
toMaintenance(id) {
|
|
toMaintenance(id) {
|
|
this.$router.push("/detection/" + id);
|
|
this.$router.push("/detection/" + id);
|
|
},
|
|
},
|
|
- getMoulds() {
|
|
|
|
- // this.listLoading = true;
|
|
|
|
- // this.http.post(
|
|
|
|
- // this.port.project.userList,
|
|
|
|
- // {
|
|
|
|
- // keyName: this.filters.keyName,
|
|
|
|
- // currentPage: this.page,
|
|
|
|
- // pageSize: this.size,
|
|
|
|
- // companyId: this.filters.companyId == "" ? -1 : this.filters.companyId,
|
|
|
|
- // flag: this.filters.flag == "姓名" ? 0 : this.filters.flag
|
|
|
|
- // },
|
|
|
|
- // res => {
|
|
|
|
- // this.listLoading = false;
|
|
|
|
- // if (res.code == "ok") {
|
|
|
|
- // this.list = res.data.list;
|
|
|
|
- // this.total = res.data.total;
|
|
|
|
- // } else {
|
|
|
|
- // this.$message({
|
|
|
|
- // message: res.msg,
|
|
|
|
- // type: "error"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // error => {
|
|
|
|
- // this.listLoading = false;
|
|
|
|
- // this.$message({
|
|
|
|
- // message: error,
|
|
|
|
- // type: "error"
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // );
|
|
|
|
|
|
+ getMoulds(keyWord) {
|
|
|
|
+ this.listLoading = true;
|
|
|
|
+ if (keyWord == null) {
|
|
|
|
+ var type = 0;
|
|
|
|
+ } else {
|
|
|
|
+ var type = this.filters.value;
|
|
|
|
+ }
|
|
|
|
+ var params = {
|
|
|
|
+ pageNum: this.page,
|
|
|
|
+ pageSize: this.size,
|
|
|
|
+ projectId: -1,
|
|
|
|
+ searchType: type,
|
|
|
|
+ keyName: keyWord
|
|
|
|
+ };
|
|
|
|
+ this.http.post(
|
|
|
|
+ this.port.mold.molds,
|
|
|
|
+ params,
|
|
|
|
+ res => {
|
|
|
|
+ this.listLoading = false;
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.moulds = res.data.list;
|
|
|
|
+ this.total = res.data.total;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.listLoading = false;
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -152,7 +135,7 @@ export default {
|
|
this.tableHeight = height - 210;
|
|
this.tableHeight = height - 210;
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- // this.getMoulds();
|
|
|
|
|
|
+ this.getMoulds();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|