src/components/view/Technicalindex.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/standard-table/technology.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/standard.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/view/Technicalindex.vue
@@ -207,7 +207,6 @@ style="width: 100%;margin-bottom: 20px;" row-key="name" border @selection-change="handleSelectionChange" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> src/components/view/standard-table/technology.vue
@@ -1,3 +1,71 @@ <template> <div class="standard"> <div> <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border @selection-change="handleSelectionChange" default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="index" width="50" label="序号"> </el-table-column> <el-table-column prop="father" label="工序" sortable width="200px"> <template slot-scope="scope"> <el-tag v-if="scope.row.children" :type="scope.row.children ? 'primary' : 'success'"> <div class="firstDiv" :style="{ color: scope.row.children ? '#16a7ff' : '#58c173' }"> 01 </div> </el-tag> <span style="color: black"> {{ scope.row.father }} </span> </template> </el-table-column> <el-table-column prop="name" sortable label="工艺名称"> <template slot-scope="scope"> <el-tag v-if="!scope.row.children"> <div class="firstDiv" :style="`color: ${scope.row.children? '#16a7ff' : '#58c173'}`"> 02 </div> </el-tag> <span style="color: black"> {{ scope.row.name }} </span> </template> </el-table-column> <el-table-column prop="dg" label="设备组"> </el-table-column> <el-table-column prop="pq" label="生产定额"> </el-table-column> <el-table-column prop="" label="操作"> <el-butten style="color: rgb(137, 137, 229);">编辑</el-butten> </el-table-column> </el-table> </div> </div> </template> <script> export default { data() { return { selects: [] } }, props:['tableData','tableType'], created() { console.log(this.tableData,this.tableType) }, mounted() { }, methods: { handleSelectionChange(val) { this.selects = val; } } } </script> <style scoped> .standard { width: 100%; @@ -41,98 +109,3 @@ padding-left: 23px !important; } </style> <template> <div class="standard"> <!-- <el-table :data="tableData" border style="width: 100%" row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> <el-table-column type="selection" width="50"> </el-table-column> <template v-if="tableType==1"> <el-table-column type="index" label="序号" width="70"> <template slot-scope="scope"> {{ scope.row.index }} </template> </el-table-column> <el-table-column prop="name" label="项目"> <template slot-scope="scope"> <el-tag size="mini" :type="scope.row.index? '':'success'" :style="{borderRadius: '40%',marginRight: '12px'}">{{ scope.row.index? '01':'02'}}</el-tag> {{scope.row.name}} </template> </el-table-column> <el-table-column prop="unit" label="单位"> </el-table-column> <el-table-column prop="required" label="标准值"> </el-table-column> <el-table-column prop="internal" label="内控值"> </el-table-column> </template> <template v-else> <el-table-column prop="name" label="工艺名称"> </el-table-column> <el-table-column prop="device_group" label="设备组"> </el-table-column> <el-table-column label="匹配设备"> <template> <el-button type="text">选择</el-button> </template> </el-table-column> <el-table-column prop="quota" label="工时定额"> </el-table-column> </template> </el-table> --> <div> <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border @selection-change="handleSelectionChange" default-expand-all :tree-props="{ children: 'name', hasChildren: 'children' }"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="index" width="50" label="序号"> </el-table-column> <el-table-column prop="name" label="工序" sortable width="300px"> <template slot-scope="scope"> <el-tag> <div class="firstDiv" :style="`color: ${scope.row.children? '#16a7ff' : '#58c173'}`"> {{ scope.row.children ? "01" : "02" }} </div> </el-tag> <span style="color: black">{{ scope.row.name }}</span> </template> </el-table-column> <el-table-column prop="" sortable label="工艺名称"> </el-table-column> <el-table-column prop="" label="指标名称"> </el-table-column> <el-table-column prop="" label="单位"> </el-table-column> <el-table-column prop="" label="内控值"> </el-table-column> <el-table-column prop="unit" label="标准值"> </el-table-column> </el-table> </div> </div> </template> <script> export default { data() { return { selects: [] } }, props:['tableData','tableType'], created() { console.log(this.tableData,this.tableType) }, mounted() { }, methods: { handleSelectionChange(val) { this.selects = val; } } } </script> src/components/view/standard.vue
@@ -42,7 +42,7 @@ <span>{{ tableType == 1 ? '项目:' : '工艺名称:' }}</span> <el-input v-model="searchName" size="small" placeholder="请输入" style="width: 224px;margin-right: 24px;" clearable></el-input> <span>{{ tableType == 1 ? '版本:' : '工艺名称:' }}</span> <span>{{ tableType == 1 ? '版本:' : '版本:' }}</span> <el-select v-model="VER" @change="verevent" style="width: 280px;" placeholder="请选择"> <el-option v-for="item in version" :key="item" :label="item" :value="item"> </el-option> @@ -52,54 +52,24 @@ 询</span></el-button> </div> <!-- <div v-if="this.typeselect == 0"> 工艺路线 <div v-if="this.typeselect == 0"> <technology :tableType="tableType" :tableData="tableData"></technology> </div> <div v-if="this.typeselect == 1"> 技术指标 </div> <div v-if="this.typeselect == 2"> 物料清单 <material :tableType="tableType" :tableData="tableData"></material> </div> <div v-if="this.typeselect == 3"> 生产工艺 </div> --> <!-- <div> <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border @selection-change="handleSelectionChange" default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="index" width="50" label="序号"> </el-table-column> <el-table-column prop="name" label="工序" sortable width="300px"> <template slot-scope="scope"> <el-tag> <div class="firstDiv" :style="`color: ${scope.row.children? '#16a7ff' : '#58c173'}`"> {{ scope.row.children ? "01" : "02" }} </div> </el-tag> <span style="color: black">{{ scope.row.name }}</span> </template> </el-table-column> <el-table-column prop="" sortable label="工艺名称"> </el-table-column> <el-table-column prop="" label="指标名称"> </el-table-column> <el-table-column prop="" label="单位"> </el-table-column> <el-table-column prop="" label="内控值"> </el-table-column> <el-table-column prop="unit" label="标准值"> </el-table-column> </el-table> </div> --> <div class="table"> <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology> </div> <!-- <div class="table"> <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology> </div> --> <!-- <div class="table"> <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology> </div> --> </div> </div> @@ -120,8 +90,10 @@ <script> import technology from "./standard-table/technology.vue" import material from "./standard-table/material.vue" export default { components: { technology }, components: { technology,material }, data() { return { // BOM树数据结构 @@ -153,8 +125,8 @@ // }, mounted() { this.selectMaterialTree() this.selectVersion() this.selectAll() this.selectVersion() }, methods: { handleSelectionChange() { @@ -185,6 +157,20 @@ console.log(this.verdata); }) }, //右侧数据 selectAll() { console.log(this.$axios.get(this.$api.url.selectAll)); this.$axios.get(this.$api.url.selectAll, { params: { specificationsId: this.returntree.id,//tree的点击反馈 type: this.typeselect,//类型 version: this.character,//版本 } }).then(res => { console.log(res.data); this.tableData = res.data }) }, verevent(val) { console.log(val); let cc = val.replace('v', '') @@ -194,19 +180,6 @@ // const { v, ...newObj } = val; // delete newObj.v // console.log(newObj); }, //右侧数据 selectAll() { console.log(this.$axios.get(this.$api.url.selectAll)); this.$axios.get(this.$api.url.selectAll, { params: { specificationsId: this.returntree.id, type: this.typeselect, version: this.character, } }).then(res => { this.tableData = res.data }) }, //五级树 selectMaterialTree() {