|
@@ -1,4 +1,4 @@
|
|
|
-<template>
|
|
|
+<template slot-scope="scope">
|
|
|
<section>
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
@@ -21,7 +21,7 @@
|
|
|
<el-button type="primary">查询</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right;">
|
|
|
- <el-button type="primary">下载</el-button>
|
|
|
+ <el-button type="primary" id="aa">下载</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -35,40 +35,86 @@
|
|
|
style="width: 100%;"
|
|
|
>
|
|
|
<el-table-column type="index" width="60"></el-table-column>
|
|
|
- <el-table-column prop="name" label="模具名称" width="200" sortable></el-table-column>
|
|
|
- <el-table-column label="模具3D图档" width="200" sortable>
|
|
|
+ <el-table-column width="200">
|
|
|
+ <template slot="header">
|
|
|
+ <el-checkbox @change="checkName($event,0)">
|
|
|
+ <span>模具名称</span>
|
|
|
+ </el-checkbox>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.mould3D == 0">未上传</span>
|
|
|
- <span v-else-if="scope.row.mould3D == 1">审批中</span>
|
|
|
- <span v-else>已通过</span>
|
|
|
+ <el-checkbox>
|
|
|
+ <span>{{scope.row.name}}</span>
|
|
|
+ </el-checkbox>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="模具2D图档" width="200" sortable>
|
|
|
+ <el-table-column width="200">
|
|
|
+ <template slot="header">
|
|
|
+ <el-checkbox>
|
|
|
+ <span>模具3D图档</span>
|
|
|
+ </el-checkbox>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.mould2D == 0">未上传</span>
|
|
|
- <span v-else-if="scope.row.mould2D == 1">审批中</span>
|
|
|
- <span v-else>已通过</span>
|
|
|
+ <span v-if="scope.row.states[0] == 0" style="padding-left: 24px;">未上传</span>
|
|
|
+ <span v-else-if="scope.row.states[0] == 1" style="padding-left: 24px;">审批中</span>
|
|
|
+ <span v-else>
|
|
|
+ <el-checkbox>已通过</el-checkbox>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="零件3D图档" width="200" sortable>
|
|
|
+ <el-table-column width="200">
|
|
|
+ <template slot="header">
|
|
|
+ <el-checkbox>
|
|
|
+ <span>模具2D图档</span>
|
|
|
+ </el-checkbox>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.part3D == 0">未上传</span>
|
|
|
- <span v-else-if="scope.row.part3D == 1">审批中</span>
|
|
|
- <span v-else>已通过</span>
|
|
|
+ <span v-if="scope.row.states[1] == 0" style="padding-left: 24px;">未上传</span>
|
|
|
+ <span v-else-if="scope.row.states[1] == 1" style="padding-left: 24px;">审批中</span>
|
|
|
+ <span v-else>
|
|
|
+ <el-checkbox>已通过</el-checkbox>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="零件2D图档" width="200" sortable>
|
|
|
+ <el-table-column width="200">
|
|
|
+ <template slot="header">
|
|
|
+ <el-checkbox>
|
|
|
+ <span>零件3D图档</span>
|
|
|
+ </el-checkbox>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.part2D == 0">未上传</span>
|
|
|
- <span v-else-if="scope.row.part2D == 1">审批中</span>
|
|
|
- <span v-else>已通过</span>
|
|
|
+ <span v-if="scope.row.states[2] == 0" style="padding-left: 24px;">未上传</span>
|
|
|
+ <span v-else-if="scope.row.states[2] == 1" style="padding-left: 24px;">审批中</span>
|
|
|
+ <span v-else>
|
|
|
+ <el-checkbox>已通过</el-checkbox>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="保养方案" width="200" sortable>
|
|
|
+ <el-table-column width="200">
|
|
|
+ <template slot="header">
|
|
|
+ <el-checkbox>
|
|
|
+ <span>零件2D图档</span>
|
|
|
+ </el-checkbox>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.states[3] == 0" style="padding-left: 24px;">未上传</span>
|
|
|
+ <span v-else-if="scope.row.states[3] == 1" style="padding-left: 24px;">审批中</span>
|
|
|
+ <span v-else>
|
|
|
+ <el-checkbox>已通过</el-checkbox>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="200">
|
|
|
+ <template slot="header">
|
|
|
+ <el-checkbox>
|
|
|
+ <span>保养方案</span>
|
|
|
+ </el-checkbox>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.maintenance == 0">未上传</span>
|
|
|
- <span v-else-if="scope.row.maintenance == 1">审批中</span>
|
|
|
- <span v-else>已通过</span>
|
|
|
+ <span v-if="scope.row.states[4] == 0" style="padding-left: 24px;">未上传</span>
|
|
|
+ <span v-else-if="scope.row.states[4] == 1" style="padding-left: 24px;">审批中</span>
|
|
|
+ <span v-else>
|
|
|
+ <el-checkbox>已通过</el-checkbox>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -97,21 +143,39 @@ export default {
|
|
|
//临时数据
|
|
|
{
|
|
|
name: "墨盒类型1",
|
|
|
- mould3D: 0,
|
|
|
- mould2D: 1,
|
|
|
- part3D: 2,
|
|
|
- part2D: 0,
|
|
|
- maintenance: 1
|
|
|
+ states: [0, 1, 2, 0, 1]
|
|
|
},
|
|
|
{
|
|
|
- name: "墨盒类型啦啦",
|
|
|
- mould3D: 2,
|
|
|
- mould2D: 0,
|
|
|
- part3D: 1,
|
|
|
- part2D: 2,
|
|
|
- maintenance: 0
|
|
|
+ name: "墨盒类型2",
|
|
|
+ states: [2, 0, 1, 2, 0]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "墨盒类型3",
|
|
|
+ states: [1, 2, 0, 1, 2]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "墨盒类型4",
|
|
|
+ states: [0, 1, 2, 0, 1]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "墨盒类型5",
|
|
|
+ states: [2, 0, 1, 2, 0]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "墨盒类型6",
|
|
|
+ states: [2, 2, 2, 2, 2]
|
|
|
}
|
|
|
],
|
|
|
+ checkBoxArray: [],
|
|
|
+ defaultItem: { value: false, able: true },
|
|
|
+ defaultLine: [
|
|
|
+ { value: false, able: true },
|
|
|
+ { value: false, able: true },
|
|
|
+ { value: false, able: true },
|
|
|
+ { value: false, able: true },
|
|
|
+ { value: false, able: true },
|
|
|
+ { value: false, able: true }
|
|
|
+ ],
|
|
|
filters: {
|
|
|
name: "",
|
|
|
value: ""
|
|
@@ -131,7 +195,7 @@ export default {
|
|
|
this.size = val;
|
|
|
// this.getUsers();
|
|
|
},
|
|
|
- selsChange: function(sels) {
|
|
|
+ selsChange(sels) {
|
|
|
this.sels = sels;
|
|
|
}
|
|
|
},
|
|
@@ -139,7 +203,25 @@ export default {
|
|
|
let height = window.innerHeight;
|
|
|
this.tableHeight = height - 210;
|
|
|
},
|
|
|
- mounted() {}
|
|
|
+ mounted() {
|
|
|
+ //向checkBoxArray中push信息
|
|
|
+ this.checkBoxArray = [];
|
|
|
+ this.checkBoxArray.push(this.defaultLine);
|
|
|
+ this.moulds.forEach(mould => {
|
|
|
+ var checkBoxLine = [];
|
|
|
+ checkBoxLine.push(this.defaultItem);
|
|
|
+ for (var i = 0; i < 6; i++) {}
|
|
|
+ mould.states.forEach(state => {
|
|
|
+ var value = false;
|
|
|
+ var able = state == 2;
|
|
|
+ var item = { value, able };
|
|
|
+ checkBoxLine.push(item);
|
|
|
+ });
|
|
|
+ // console.log(checkBoxLine);
|
|
|
+ this.checkBoxArray.push(checkBoxLine);
|
|
|
+ });
|
|
|
+ // console.log(this.checkBoxArray);
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|