modified: src/components/view/standard-table/material.vue
modified: src/components/view/standard-table/technology.vue
modified: src/components/view/standard.vue
| | |
| | | <template> |
| | | <div class="standard"> |
| | | <div> |
| | | <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border |
| | | <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="id" 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 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"> |
| | | <el-tag v-if="scope.row.children" type="primary">01</el-tag> |
| | | <span style="color: #000000"> |
| | | {{ scope.row.father }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="tanme" 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> |
| | | <el-table-column prop="name" sortable label="工艺名称"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="!scope.row.children">02</el-tag> |
| | | <span style="color: black"> |
| | | {{ scope.row.tname }} |
| | | {{ scope.row.name }} |
| | | </span> |
| | | </template> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="mname" label="材料名称"> |
| | | </el-table-column> |
| | |
| | | <template> |
| | | <div class="standard"> |
| | | <div> |
| | | <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="name" border |
| | | <el-table :data="tableData" height="800" row-key="id" border |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}" |
| | | @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 type="index" width="60" 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> |
| | | <el-tag v-if="scope.row.children" type="primary">01</el-tag> |
| | | <span style="color: black"> |
| | | {{ scope.row.father }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" sortable label="工艺名称"> |
| | | <el-table-column 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-tag type="success" v-if="!scope.row.children">02</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 label="操作"> |
| | | <el-button style="color: rgb(137, 137, 229);">编辑</el-button> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | }, |
| | | props:['tableData','tableType'], |
| | | created() { |
| | | console.log(this.tableData,this.tableType) |
| | | console.log(this.tableData) |
| | | }, |
| | | mounted() { |
| | | |
| | |
| | | 询</span></el-button> |
| | | </div> |
| | | |
| | | <div v-if="this.typeselect == 0"> |
| | | <div class="contentTable" v-if="this.typeselect == 0"> |
| | | <technology :tableType="tableType" :tableData="tableData"></technology> |
| | | </div> |
| | | <div v-if="this.typeselect == 1"> |
| | | 技术指标 |
| | | </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 v-if="this.typeselect == 3">生产工艺</div> |
| | | <!-- <div class="table"> |
| | | <technology v-if="tableData.length !== 0" :tableType="tableType" :tableData="tableData"></technology> |
| | | </div> --> |
| | |
| | | checkTreeNode: {},// 点击选中树节点 |
| | | tableData: [], |
| | | bomAddModelVisible: false,// 控制bom新增模态框是否显示 |
| | | list: [], |
| | | typeselect: 0, |
| | | returntree: { |
| | | id:28, |
| | |
| | | }, |
| | | //右侧数据 |
| | | selectAll() { |
| | | console.log(this.$axios.get(this.$api.url.selectAll)); |
| | | this.$axios.get(this.$api.url.selectAll, { |
| | | params: { |
| | | specificationsId: this.returntree.id,//tree的点击反馈 |
| | |
| | | version: this.character,//版本 |
| | | } |
| | | }).then(res => { |
| | | console.log(res.data); |
| | | this.tableData = res.data |
| | | let arr = res.data; |
| | | for(var i=0;i<arr.length;i++){ |
| | | arr[i].id = "0" + i; |
| | | } |
| | | this.tableData = arr; |
| | | }) |
| | | }, |
| | | verevent(val) { |
| | |
| | | } |
| | | }) |
| | | this.selectDataList() |
| | | // 默认第一个五级节点搜索,新增配置项 |
| | | const treeOptions = JSON.parse(JSON.stringify(this.list)); |
| | | this.getDefault(treeOptions, 0); |
| | | this.formTypeOptions = treeOptions; |
| | | this.$nextTick().then(() => { |
| | | const firstNode = document.querySelector( |
| | | ".el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node" |
| | | ); |
| | | try { |
| | | firstNode.click(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | getDefault(arr, index) { |
| | | for (const item of arr) { |
| | | if (item.children && item.children.length > 0) { |
| | | // 有子节点 |
| | | this.getDefault(item.children, index + 1); |
| | | if (index === 2) { |
| | | item.children = null; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | |
| | | <style scoped> |
| | | .standard {} |
| | | |
| | | .standard .contentTable{ |
| | | } |
| | | |
| | | .standard .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |