| | |
| | | } |
| | | </style> |
| | | |
| | | |
| | | <template> |
| | | <div class="record_content"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">记录内容维护</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;">新增</el-button> |
| | | <el-button icon="el-icon-edit-outline">修改</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" @click="addend">新增</el-button> |
| | | <el-button icon="el-icon-edit-outline" @click="modify">修改</el-button> |
| | | <el-button icon="el-icon-delete" @click="dels">删除</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>类型:</span> |
| | | <el-select v-model="search.type" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | | <el-option label="分支组件" :value="3"></el-option> |
| | | </el-select> |
| | | <span>工序:</span> |
| | | <!-- <span>工序:</span> |
| | | <el-select v-model="search.name" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | <el-button size="mini" @click="clean()"><span>重 置</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>查 |
| | | 询</span></el-button> |
| | | 询</span></el-button> --> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | |
| | | <el-button @click="upDia = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 新增弹窗 --> |
| | | <el-dialog title="工序新增" :visible.sync="dialogVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="记录"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.vvvv"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.aaaa"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogVisible = false">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 修改弹窗 --> |
| | | <el-dialog title="工序编辑" :visible.sync="modifyVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="请选择类型" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="记录"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.vvvv"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.aaaa"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="modifyVisible = false">确 定</el-button> |
| | | <el-button @click="modifyVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | search: { |
| | | type: 0, |
| | | name: null, |
| | | technology: null |
| | | name: 2, |
| | | technology: 2 |
| | | }, |
| | | options:[], |
| | | value:{}, |
| | | form:{}, |
| | | modifyVisible:false, |
| | | dialogVisible:false, |
| | | process: [], |
| | | list: [{ |
| | | id: 0, |
| | | name: "原材料", |
| | | children: [{ |
| | | id: 3, |
| | | name: "工艺", |
| | | children: [{ |
| | | id: 6, |
| | | name: "设备1" |
| | | }] |
| | | }] |
| | | }, { |
| | | id: 1, |
| | | name: "成品", |
| | | children: [{ |
| | | id: 4, |
| | | name: "工艺" |
| | | }] |
| | | }, { |
| | | id: 2, |
| | | name: "半成品", |
| | | children: [{ |
| | | id: 5, |
| | | name: "工艺" |
| | | }] |
| | | }], |
| | | list: [], |
| | | checkTreeNode: {}, |
| | | tableData: [{ |
| | | id: 1, |
| | | name: "质量追溯号", |
| | | unit: "单位", |
| | | thing: "dajskda" |
| | | }, { |
| | | id: 2, |
| | | name: "作业人员", |
| | | unit: "单位", |
| | | thing: "dajskda" |
| | | }, { |
| | | id: 3, |
| | | name: "规格", |
| | | unit: "单位", |
| | | thing: "dajskda" |
| | | }, { |
| | | id: 4, |
| | | name: "规格", |
| | | unit: "单位", |
| | | thing: "dajskda" |
| | | }, { |
| | | id: 5, |
| | | name: "规格", |
| | | unit: "单位", |
| | | thing: "dajskda" |
| | | }], |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | typeselect:0, |
| | | upDia: false, |
| | | checkTreeNode:[], |
| | | upData: { |
| | | id: 0, |
| | | name: null, |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectDataList() |
| | | this.selectAllleft() |
| | | }, |
| | | methods: { |
| | | TYpe(val) { |
| | | this.typeselect = val |
| | | console.log(this.typeselect); |
| | | this.selectAllleft() |
| | | }, |
| | | //主体左 |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft,{ |
| | | params:{type:this.typeselect} |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | }) |
| | | }, |
| | | //selectjilu checkTreeNode |
| | | selectjilu() { |
| | | this.$axios.get(this.$api.url.selectjilu,{ |
| | | params:{id:this.checkTreeNode.id} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }) |
| | | }, |
| | | modify(){ |
| | | this.modifyVisible = true |
| | | }, |
| | | addend(){ |
| | | this.dialogVisible = true |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.checkTreeNode = data |
| | | this.selectjilu() |
| | | if(data.code=='[3]'){ |
| | | console.log(data); |
| | | } |