From d67b3fe1341e508fc48be3de9bf403d76482d94c Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期五, 14 六月 2024 18:09:14 +0800 Subject: [PATCH] 标准库导入 --- src/components/view/b2-standard.vue | 32 +++++++-------- src/components/do/b1-ins-order/add.vue | 31 ++++++++++----- src/components/do/b1-ins-order/equip-config.vue | 24 ++++++++--- src/components/do/b1-ins-order/fiberoptic-config.vue | 10 ++-- 4 files changed, 58 insertions(+), 39 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index ffa7fc9..cd18ce7 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -336,13 +336,13 @@ <el-table-column type="index" label="搴忓彿" width="65" align="center"></el-table-column> <el-table-column prop="sample" label="鏍峰搧鍚嶇О" align="center" min-width="100"> <template slot-scope="scope"> - <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input> + <el-input size="small" v-model="scope.row.sample" clearable :disabled="active>1"></el-input> </template> </el-table-column> <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="140" align="center"> <template slot-scope="scope"> <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" - :readonly="active>1"></el-input> + :disabled="active>1"></el-input> </template> </el-table-column> <el-table-column prop="model" label="鏍峰搧鍨嬪彿" align="center" min-width="100"> @@ -365,7 +365,7 @@ <template slot-scope="scope"> <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1" placeholder="妫�楠屾爣鍑�" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)" - @focus="methodFocus" :readonly="active>1" style="width: 100%;"> + @focus="methodFocus" :readonly="active>1" style="width: 100%;" clearable @clear="productList = []"> <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> </el-option> </el-select> @@ -389,7 +389,7 @@ :controls="false" style="width: 80%;"></el-input-number> </template> </el-table-column> - <el-table-column prop="proNum" label="妫�楠岄」璁℃暟" width="120" align="center" ></el-table-column> + <el-table-column prop="proNum" label="寰呮椤规暟閲�" width="105" align="center" ></el-table-column> </el-table> <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" @@ -802,7 +802,7 @@ 'addObj.sampleNum'(val){ this.model = null this.standardMethodListId = null - }, + } }, mounted() { this.selectEnumByCategoryForType() @@ -1119,7 +1119,11 @@ }, getNodeParent(val) { if (val.parent != null) { - this.selectTree += ' - ' + val.label + if(val.data.children === null){ + this.selectTree += ' - ' + val.label + ' - ' + '' + }else{ + this.selectTree += ' - ' + val.label + } this.getNodeParent(val.parent) } }, @@ -1137,14 +1141,20 @@ }, activeStandardTree() { let trees = this.selectTree.split(" - ") - if (trees.length < 4) { - this.$message.error('鏈�夋嫨浜у搧') + if (trees.length < 3) { + this.$message.error('鏈�夋嫨瀵硅薄') return } this.addObj.factory = trees[0] this.addObj.laboratory = trees[1] this.addObj.sampleType = trees[2] - this.addObj.sample = trees[3] + if(trees[3]===''){ + this.addObj.sample = (trees[4] == undefined ? null : trees[4]) + }else if(trees[3]===undefined){ + this.addObj.sample = trees[2] + }else{ + this.addObj.sample = trees[3] + } this.addObj.model = (trees[4] == undefined ? null : trees[4]) this.selectStandardTree = false this.sampleList = [] @@ -1485,8 +1495,9 @@ this.selectsStandardMethodByFLSSM() }, handleChangeModel(e) { + this.productList = [] let num = this.selectTree.split('-').length; - if (num == 4) { + if (num != 5) { this.selectTree = this.selectTree + ' - ' + e } else { let arr = this.selectTree.split('-') diff --git a/src/components/do/b1-ins-order/equip-config.vue b/src/components/do/b1-ins-order/equip-config.vue index 019079d..f44df90 100644 --- a/src/components/do/b1-ins-order/equip-config.vue +++ b/src/components/do/b1-ins-order/equip-config.vue @@ -2,7 +2,7 @@ <div class="ins_order_config"> <div> <el-row class="title"> - <el-col :span="6" style="padding-left: 20px;">鐢电紗閰嶇疆</el-col> + <el-col :span="6" style="padding-left: 20px;">瀛愭牱鍝侀厤缃�</el-col> <el-col :span="18" style="text-align: right;"> <el-button size="medium" type="primary" @click="addChild" v-if="active==1">娣诲姞瀛愭牱鍝�</el-button> <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">淇� 瀛�</el-button> @@ -220,11 +220,11 @@ }) }, save() { - if(this.sampleList.length === 0){ + if (this.sampleList.length === 0) { this.$message.error('缂哄皯閰嶇疆鏃犳硶淇濆瓨') return } - this.parentSample.forEach(a=>{ + this.parentSample.forEach(a => { a.childSampleList = this.sampleList }) this.$message.success('宸蹭繚瀛�') @@ -240,7 +240,7 @@ this.selectStandardTree = true }, selectSample(val) { - if(val === null)return + if (val === null) return this.sampleIds = [val.id] }, rowClick(row, column, event) { @@ -275,7 +275,7 @@ }, handleChangeModel(e) { let num = this.selectTree.split('-').length; - if (num == 4) { + if (num != 5) { this.selectTree = this.selectTree + ' - ' + e } else { let arr = this.selectTree.split('-') @@ -458,7 +458,13 @@ this.addObj.factory = trees[0] this.addObj.laboratory = trees[1] this.addObj.sampleType = trees[2] - this.addObj.sample = trees[3] + if(trees[3]===''){ + this.addObj.sample = (trees[4] == undefined ? null : trees[4]) + }else if(trees[3]===undefined){ + this.addObj.sample = trees[2] + }else{ + this.addObj.sample = trees[3] + } this.addObj.model = (trees[4] == undefined ? null : trees[4]) this.selectStandardTree = false this.sample.joinName = null @@ -496,7 +502,11 @@ }, getNodeParent(val) { if (val.parent != null) { - this.selectTree += ' - ' + val.label + if (val.data.children === null) { + this.selectTree += ' - ' + val.label + ' - ' + '' + } else { + this.selectTree += ' - ' + val.label + } this.getNodeParent(val.parent) } }, diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue index c69bb70..1377575 100644 --- a/src/components/do/b1-ins-order/fiberoptic-config.vue +++ b/src/components/do/b1-ins-order/fiberoptic-config.vue @@ -104,11 +104,11 @@ </el-col> </el-row> <el-row :gutter="10"> - <el-col :span="12"> + <el-col :span="12" v-if="packageInfo.ismiers"> <div class="grid-content"> <h5>鍏夌氦甯� <el-button size="mini" type="primary" class="btns" @click="addFibers" - :disabled="packageInfo.ismiers===false||miresModel===null||miresStandard===null" v-if="active==1">鐢熸垚鍏夌氦甯�</el-button> + :disabled="miresModel===null||miresStandard===null" v-if="active==1">鐢熸垚鍏夌氦甯�</el-button> <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">娓呴櫎</el-button> </h5> <div @@ -150,7 +150,7 @@ </el-table> </div> </el-col> - <el-col :span="12"> + <el-col :span="!packageInfo.ismiers?24:12"> <div class="grid-content"> <h5>鍏夌氦<el-button size="mini" type="primary" class="btns" @click="addFiber" :disabled="mireModel===null||mireStandard===null" v-if="active==1">鍏夌氦閰嶈壊</el-button></h5> @@ -501,8 +501,8 @@ this.miresModels = [] res.data.forEach(a => { this.miresModels.push({ - label: a.sample, - value: a.sample + label: a.model, + value: a.model }) }) }) diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 5e6be92..2d3cc6f 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -192,9 +192,10 @@ <div class="custom-tree-node" slot-scope="{ node, data }"> <el-row style="width: 100%;"> <el-col :span="21" :class="{sort:node.level>3}" :title="data.label"> - <span><i - :class="`node_i ${data.children != undefined ? (data.code==='[1]'?'el-icon-folder-opened':'el-icon-folder') : 'el-icon-tickets'}`"></i> - {{ data.code }} {{ data.label }}</span> + <span> + <i :class="`node_i ${data.children != undefined ? (data.code==='[1]'?'el-icon-folder-opened':'el-icon-folder') : 'el-icon-tickets'}`"></i> + {{ data.label }} + </span> </el-col> <el-col :span="2" style="text-align: right;" v-if="delStandardTree&&node.level==5"> <el-button type="text" size="mini" @click.stop="remove(node, data)"> @@ -223,13 +224,6 @@ </el-table-column> <el-table-column prop="name" label="鏍囧噯鍚嶇О" show-overflow-tooltip></el-table-column> <el-table-column prop="remark" label="澶囨敞" show-overflow-tooltip></el-table-column> - <!-- <el-table-column prop="createUserName" label="鍒涘缓浜�"></el-table-column> - <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="250px"></el-table-column> --> - <!-- <el-table-column label="鎿嶄綔" width="100" align="center" v-if="delStandardMethod"> - <template slot-scope="scope"> - <el-button type="text" size="small" @click="delStandardMethodByFLSSM(scope.row.id)">鍒犻櫎</el-button> - </template> - </el-table-column> --> </el-table> </el-row> <el-row class="product_table" v-loading="tableLoad2"> @@ -309,7 +303,7 @@ </div> <el-dialog title="鍒嗙被娣诲姞" :visible.sync="addDia" width="400px"> <div class="body"> - <el-row style="line-height: 50px;"> + <!-- <el-row style="line-height: 50px;"> <el-col :span="6" style="text-align: right;">宸ュ巶锛�</el-col> <el-col :span="16" :offset="1"> <el-input size="small" readonly v-model="addOb.factory"></el-input> @@ -332,13 +326,13 @@ <el-col :span="16" :offset="1"> <el-input v-model="addOb.sample" readonly size="small"></el-input> </el-col> - </el-row> + </el-row> --> <el-row style="line-height: 50px;"> <el-col :span="6" style="text-align: right;"> <span class="required-span">* </span>鍨嬪彿锛� </el-col> <el-col :span="16" :offset="1"> - <el-input v-model="addOb.model" placeholder="璇疯緭鍏ュ瀷鍙�" clearable size="small"></el-input> + <el-input v-model="addOb.model" placeholder="璇疯緭鍏ュ瀷鍙�" clearable size="small" @keyup.enter.native="addStandardTree"></el-input> </el-col> </el-row> </div> @@ -695,7 +689,11 @@ }, getNodeParent(val) { if (val.parent != null) { - this.selectTree += ' - ' + val.label + if(val.data.children === null){ + this.selectTree += ' - ' + val.label + ' - ' + '' + }else{ + this.selectTree += ' - ' + val.label + } this.getNodeParent(val.parent) } }, @@ -868,8 +866,8 @@ }) }, addStandardTree() { - if (this.addOb.sample == null || this.addOb.sample == '') { - this.$message.error('浜у搧涓嶅瓨鍦�') + if (this.addOb.sampleType == null || this.addOb.sampleType == '') { + this.$message.error('瀵硅薄涓嶅瓨鍦�') return } if (this.addOb.model == null || this.addOb.model == '') { @@ -1478,7 +1476,7 @@ return } this.$message.success('涓婁紶鎴愬姛') - this.refresh() + this.selectStandardTreeList() }, onError(err, file, fileList) { this.$message.error('涓婁紶澶辫触') -- Gitblit v1.9.3