| | |
| | | </div> |
| | | <div class="center"> |
| | | <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="50%" tooltip-effect="dark" |
| | | border highlight-current-row @row-click="rowClick" style="margin-top: 10px;" |
| | | @current-change="selectSample"> |
| | | border highlight-current-row @row-click="rowClick" @current-change="selectSample"> |
| | | <!-- <el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column> --> |
| | | <el-table-column type="index" label="序号" width="65" align="center"></el-table-column> |
| | | <el-table-column prop="sample" label="样品名称" align="center" min-width="100"> |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="joinName" label="配套样品名称" width="140" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1}" |
| | | v-model="scope.row.joinName" :disabled="active!=1"></el-input> |
| | | </template> |
| | | <el-table-column prop="num" label="样品数量" align="center" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="joinModel" label="配套样品型号" width="140" align="center"> |
| | | <el-table-column label="操作" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1}" |
| | | v-model="scope.row.joinModel" :disabled="active!=1"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="joinNum" label="配套样品数量" width="140" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number size="small" v-model="scope.row.joinNum" :min="1" :max="100" :precision="0" |
| | | :controls="false" style="width: 80%;" :disabled="active!=1"></el-input-number> |
| | | <el-button @click.native.prevent="deleteRow(scope.$index, sampleList)" type="text" |
| | | size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="选择子样品" :visible.sync="selectStandardTree" width="400px"> |
| | | <el-dialog title="选择子样品" :visible.sync="selectStandardTree" width="400px" @closed="addObj.sampleNum = 1"> |
| | | <div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree"> |
| | | <el-row style="margin-bottom: 10px;"> |
| | | <el-col :span="24"> |
| | |
| | | <el-button type="primary" @click="activeStandardTree">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose"> |
| | | <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" width="500px" :show-close="false" |
| | | :before-close="beforeClose"> |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row v-if="bsm1"> |
| | | <el-col class="search_thing" :span="22"> |
| | |
| | | <div class="search_label">要求值:</div> |
| | | <div class="search_input" v-show="bsm1Val!==null&&bsm1Val!==''"> |
| | | <el-radio-group v-model="bsm1Val" @input="upBsm1"> |
| | | <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a">{{JSON.parse(bsmRow.ask)[ai]}}</el-radio> |
| | | <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" |
| | | :label="a">{{JSON.parse(bsmRow.ask)[ai]}}</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | |
| | | bsm1: false, |
| | | bsm1Val:null, |
| | | bsm1Dia:false, |
| | | list:[] |
| | | list: [], |
| | | parentSample: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectStandardTreeList() |
| | | this.selectStandardMethods() |
| | | this.$parent.sampleIds.forEach(a => { |
| | | for (var i = 0; i < this.$parent.sampleList.length; i++) { |
| | | if (this.$parent.sampleList[i].id == a) { |
| | | this.sampleList = this.$parent.sampleList[i].childSampleList |
| | | this.parentSample.push(this.$parent.sampleList[i]) |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | methods:{ |
| | | save(){}, |
| | | selectStandardTreeList() { |
| | | this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => { |
| | | this.list = res.data |
| | | this.list.forEach(a => { |
| | | this.expandedKeys.push(a.label) |
| | | }) |
| | | }) |
| | | }, |
| | | save() { |
| | | if(this.sampleList.length === 0){ |
| | | this.$message.error('缺少配置无法保存') |
| | | return |
| | | } |
| | | this.parentSample.forEach(a=>{ |
| | | a.childSampleList = this.sampleList |
| | | }) |
| | | this.$message.success('已保存') |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.productList = [] |
| | | rows.splice(index, 1); |
| | | }, |
| | | outConfig(){ |
| | | this.$parent.equipConfigShow = false |
| | | }, |
| | |
| | | this.selectStandardTree = true |
| | | }, |
| | | selectSample(val){ |
| | | if(val === null)return |
| | | this.sampleIds = [val.id] |
| | | }, |
| | | rowClick(row, column, event){ |
| | |
| | | methodFocus() { |
| | | this.selectsStandardMethodByFLSSM() |
| | | }, |
| | | selectStandardMethods() { |
| | | this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => { |
| | | this.methods = res.data |
| | | }) |
| | | }, |
| | | selectsStandardMethodByFLSSM(){ |
| | | this.methodLoad = true |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | |
| | | } |
| | | return ''; |
| | | }, |
| | | handleAll(){ |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | m.state = 1 |
| | |
| | | this.addObj.sample = trees[3] |
| | | this.addObj.model = (trees[4] == undefined ? null : trees[4]) |
| | | this.selectStandardTree = false |
| | | this.sampleList = [] |
| | | for (var i = 0; i < this.addObj.sampleNum; i++) { |
| | | this.sample.joinName = null |
| | | this.sample.joinModel = null |
| | | this.sample.joinNum = 1 |
| | |
| | | this.sample.standardMethodListId = null |
| | | this.sample.insProduct = [] |
| | | this.sample.id = this.count |
| | | this.sample.num = this.addObj.sampleNum |
| | | this.sampleList.push(this.HaveJson(this.sample)) |
| | | this.count++ |
| | | } |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | searchFilter() { |
| | |
| | | |
| | | .center { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | height: calc(100% - 60px); |
| | | } |
| | | |
| | | |
| | |
| | | border-color: #dcdfe6; |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |