| | |
| | | <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'"> |
| | | </avue-form> |
| | | <div> |
| | | <el-dialog :visible.sync="dialogVisible" title="为【编码规则】选取值" append-to-body> |
| | | <!-- 为【编码规则】选取值--> |
| | | <el-dialog :visible.sync="MasterdialogVisible" title="为【编码规则】选取值" append-to-body> |
| | | <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end" > |
| | | <el-button type="primary" size="small" @click="MasterHandlerClick">确定</el-button> |
| | | <el-button size="small" @click="dialogVisible=false">取消</el-button> |
| | | <el-button size="small" @click="MasterdialogVisible=false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 关键属性查询规则--> |
| | | <el-dialog :visible.sync="KeydialogVisible" title="为【关键属性查询规则】选取值" append-to-body> |
| | | <avue-crud :data="KeyData" :option="masterOption" @select="masterSelect"></avue-crud> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end" > |
| | | <el-button type="primary" size="small" @click="KeyHandlerClick">确定</el-button> |
| | | <el-button size="small" @click="KeydialogVisible=false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 相似项查询规则--> |
| | | <el-dialog :visible.sync="SimidialogVisible" title="为【相似项查询规则】选取值" append-to-body> |
| | | <avue-crud :data="simData" :option="masterOption" @select="masterSelect"></avue-crud> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end" > |
| | | <el-button type="primary" size="small" @click="simHandlerClick">确定</el-button> |
| | | <el-button size="small" @click="SimidialogVisible=false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | masterInput:'', |
| | | MasterSearchSelects:"", |
| | | masterData:[], |
| | | KeyData:[], |
| | | simData:[], |
| | | masterOption:{ |
| | | addBtn:false, |
| | | index:true, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | dialogVisible:false, |
| | | MasterdialogVisible:false, |
| | | KeydialogVisible:false, |
| | | SimidialogVisible:false, |
| | | form: { |
| | | name: "哈哈", |
| | | sex: "男" |
| | |
| | | label:"关键属性查询规则", |
| | | prop:"codekeyattrrepeatoidName", |
| | | labelWidth:128, |
| | | focus:this.Keyfouce |
| | | }, |
| | | { |
| | | label:"相似查询规则", |
| | | prop:"codeResembleRuleOidName", |
| | | labelWidth:128, |
| | | focus: this.simFouce |
| | | }, |
| | | |
| | | ] |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultRend() |
| | | }, |
| | | methods: { |
| | | submits(form,done){ |
| | |
| | | this.$message.success('请查看控制台'); |
| | | console.log(err) |
| | | }, |
| | | //编码规则失焦 |
| | | CodeFoucus(){ |
| | | this.dialogVisible=true; |
| | | console.log(this.dialogVisible) |
| | | this.MasterdialogVisible=true; |
| | | this.MasterdefaultRend() |
| | | }, |
| | | //编码规则确定 |
| | | MasterHandlerClick(){ |
| | | if(this.masterSelectList.length>1){ |
| | | this.$message.warning('只能选择一条数据') |
| | | }else if(this.masterSelectList.length<=0){ |
| | | this.$message.warning('请选择一条数据') |
| | | }else { |
| | | this.dialogVisible=false; |
| | | this.MasterdialogVisible=false; |
| | | this.masterSelectList=[] |
| | | this.loneTreeNewForm.codeRuleOidName=this.name; |
| | | this.loneTreeNewForm.codeRuleOid=this.oid; |
| | | console.log(this.masterSelectList) |
| | | } |
| | | }, |
| | | defaultRend(){ |
| | | //编码多选 |
| | | masterSelect(row){ |
| | | console.log(row) |
| | | this.masterSelectList=row; |
| | | this.name=row[0].name; |
| | | this.oid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | }, |
| | | //编码接口 |
| | | MasterdefaultRend(){ |
| | | defaultReferDataGrid({ |
| | | referType:'coderule', |
| | | isMuti:'false', |
| | |
| | | }).then(res=>{ |
| | | console.log('---',res) |
| | | this.masterData=res.data.records; |
| | | console.log('masterData',this.masterData) |
| | | |
| | | }) |
| | | }, |
| | | masterSelect(row){ |
| | | console.log(row) |
| | | this.masterSelectList=row; |
| | | this.name=row[0].name; |
| | | this.oid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | // 关键属性失焦 |
| | | Keyfouce(){ |
| | | this.KeydialogVisible=true; |
| | | this.KeydefaultRend() |
| | | }, |
| | | //关键属性确定 |
| | | KeyHandlerClick(){ |
| | | if(this.masterSelectList.length>1){ |
| | | this.$message.warning('只能选择一条数据') |
| | | }else if(this.masterSelectList.length<=0){ |
| | | this.$message.warning('请选择一条数据') |
| | | }else { |
| | | |
| | | } |
| | | }, |
| | | KeydefaultRend(){ |
| | | defaultReferDataGrid({ |
| | | referType:'codekeyattrrepeat', |
| | | isMuti:'false', |
| | | 'conditionMap["lcstatus"]':'Enabled' |
| | | }).then(res=>{ |
| | | this.keyData=res.data.records; |
| | | console.log('key',this.keyData) |
| | | }) |
| | | }, |
| | | // 相似项失焦 |
| | | simFouce(){ |
| | | this.SimidialogVisible=true; |
| | | }, |
| | | //相似项确定 |
| | | simHandlerClick(){ |
| | | |
| | | } |
| | | } |
| | | } |