| | |
| | | <template> |
| | | <avue-form v-model="TreeNewForm" :option="option" @submit="submit"> |
| | | </avue-form> |
| | | |
| | | <div> |
| | | <avue-form v-model="loneTreeNewForm" :option="option" @submit="submit" v-if="flag == 'renonly'"> |
| | | </avue-form> |
| | | <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> |
| | | <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> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {defaultReferDataGrid} from '@/api/MasterData/master' |
| | | import {TreeEditSave} from '@/api/template/templateAttr' |
| | | export default { |
| | | name: "classifyTreeform.vue", |
| | | props: ["TreeNewForm"], |
| | | props: ['loneTreeNewForm','flag'], |
| | | data() { |
| | | return { |
| | | name:"", |
| | | oid:"", |
| | | masterInput:'', |
| | | MasterSearchSelects:"", |
| | | masterData:[], |
| | | masterOption:{ |
| | | addBtn:false, |
| | | index:true, |
| | | border:true, |
| | | selection:true, |
| | | menu:false, |
| | | height:380, |
| | | column:[ |
| | | { |
| | | label:'英文名称', |
| | | prop:'id' |
| | | }, |
| | | { |
| | | label:'中文名称', |
| | | prop:'name' |
| | | }, |
| | | { |
| | | label:'描述', |
| | | prop:'description' |
| | | } |
| | | ] |
| | | }, |
| | | dialogVisible:false, |
| | | form: { |
| | | name: "哈哈", |
| | | sex: "男" |
| | |
| | | { |
| | | label: '主题库/分类编号', |
| | | prop: 'btmtypeid', |
| | | labelWidth:128, |
| | | labelWidth:135, |
| | | readonly: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | label: '主题库/分类名称', |
| | | prop: 'name', |
| | | readonly: true, |
| | | labelWidth:128, |
| | | labelWidth:135, |
| | | rules: [{ |
| | | required: true, |
| | | message: "主题库/分类名称", |
| | |
| | | label:"描述", |
| | | prop:"description", |
| | | labelWidth:128, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | label: '存储的业务类型', |
| | |
| | | label:"编码规则", |
| | | prop:"coderuleoidName", |
| | | labelWidth:128, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | label:"关键属性查询规则", |
| | | prop:"codekeyattrrepeatoidName", |
| | | labelWidth:128, |
| | | readonly: true, |
| | | }, |
| | | { |
| | | label:"相似查询规则", |
| | | prop:"codeResembleRuleOidName", |
| | | labelWidth:128, |
| | | readonly: true, |
| | | }, |
| | | ] |
| | | }, |
| | | options: { |
| | | column: [ |
| | | { |
| | | label: '主题库/分类编号', |
| | | prop: 'btmtypeid', |
| | | labelWidth:128, |
| | | rules: [{ |
| | | required: true, |
| | | message: "主题库/分类编号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: '主题库/分类名称', |
| | | prop: 'name', |
| | | labelWidth:128, |
| | | rules: [{ |
| | | required: true, |
| | | message: "主题库/分类名称", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label:"描述", |
| | | prop:"description", |
| | | labelWidth:128, |
| | | }, |
| | | { |
| | | label: '存储的业务类型', |
| | | prop: 'btmtypename', |
| | | labelWidth:128, |
| | | rules: [{ |
| | | required: true, |
| | | message: "存储的业务类型", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label:"编码规则", |
| | | prop:"coderuleoidName", |
| | | labelWidth:128, |
| | | focus:this.CodeFoucus |
| | | }, |
| | | { |
| | | label:"关键属性查询规则", |
| | |
| | | prop:"codeResembleRuleOidName", |
| | | labelWidth:128, |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | FormList: {} |
| | | FormList: {}, |
| | | masterSelectList:[] |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultRend() |
| | | }, |
| | | methods: { |
| | | submit(form, done) { |
| | | this.$message.success(JSON.stringify(form)); |
| | | submits(form,done){ |
| | | console.log(this.loneTreeNewForm) |
| | | TreeEditSave(this.loneTreeNewForm).then(res=>{ |
| | | this.$message.success('修改成功'); |
| | | }).catch(res=>{ |
| | | this.$message.error(res) |
| | | }) |
| | | done() |
| | | }, |
| | | error(err) { |
| | | this.$message.success('请查看控制台'); |
| | | console.log(err) |
| | | }, |
| | | CodeFoucus(){ |
| | | this.dialogVisible=true; |
| | | console.log(this.dialogVisible) |
| | | }, |
| | | MasterHandlerClick(){ |
| | | if(this.masterSelectList.length>1){ |
| | | this.$message.warning('只能选择一条数据') |
| | | }else if(this.masterSelectList.length<=0){ |
| | | this.$message.warning('请选择一条数据') |
| | | }else { |
| | | this.dialogVisible=false; |
| | | this.masterSelectList=[] |
| | | this.loneTreeNewForm.codeRuleOidName=this.name; |
| | | this.loneTreeNewForm.codeRuleOid=this.oid; |
| | | console.log(this.masterSelectList) |
| | | } |
| | | }, |
| | | defaultRend(){ |
| | | defaultReferDataGrid({ |
| | | referType:'coderule', |
| | | isMuti:'false', |
| | | 'conditionMap["lcstatus"]':'Released' |
| | | }).then(res=>{ |
| | | console.log('---',res) |
| | | this.masterData=res.data.records; |
| | | |
| | | }) |
| | | }, |
| | | masterSelect(row){ |
| | | console.log(row) |
| | | this.masterSelectList=row; |
| | | this.name=row[0].name; |
| | | this.oid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | } |
| | | } |
| | | } |
| | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | |
| | | <!--uiDataController/defaultReferDataGrid?referBo=coderule&isMuti=false&conditionMap%5B%22lcstatus%22%5D=Released--> |
| | | <!--uiDataController/defaultReferDataGrid?conditionMap%5B%22lcstatus%22%5D=Released&referBo=coderule&isMuti=false&_=1687831291212--> |