| | |
| | | </div> |
| | | </div> |
| | | <!-- 树节点添加对话框--> |
| | | <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :visible.sync="TreeAddFormVisible" v-loading="AddLoading" append-to-body |
| | | <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :before-close="TreeEscHandler" :visible.sync="TreeAddFormVisible" v-loading="AddLoading" append-to-body |
| | | style="width: 1700px;margin: auto"> |
| | | <el-form :model="TreeAddform" :rules="rules"> |
| | | <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" style="display: inline-block" prop="id"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="TreeAddFormVisible = false">取 消</el-button> |
| | | <el-button @click="TreeEscHandler">取 消</el-button> |
| | | <el-button type="primary" @click="TreeAddHandler">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input> |
| | | <el-button size="small" type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">查询</el-button> |
| | | </template> |
| | | <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud> |
| | | <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | <div style="height: 30px"> |
| | | <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.btmTypeName}}]</div> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > |
| | |
| | | inject: ["crudTreeData"], |
| | | data() { |
| | | return { |
| | | masterRow:null, |
| | | AddLoading:false, |
| | | // 定义一个变量来保存树请求的数量 |
| | | requestCount:0, |
| | | requestCount:null, |
| | | //导入状态框 |
| | | ThemeImportVisible:false, |
| | | selectRow:'', |
| | |
| | | addBtn:false, |
| | | index:true, |
| | | border:true, |
| | | selection:true, |
| | | menu:false, |
| | | height:380, |
| | | column:[ |
| | | { |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | display: false |
| | | }, |
| | | { |
| | | label:'英文名称', |
| | | prop:'id' |
| | |
| | | label: '英文名称' |
| | | } |
| | | ], |
| | | SelectValue:"", |
| | | SelectValue:"id", |
| | | SelectFInd:"", |
| | | addFlag:false, |
| | | // 表格当前行id |
| | |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: '请输入名称', trigger: 'blur' }, |
| | | { required: true, message: '请输入编号', trigger: 'blur' }, |
| | | ], |
| | | name:[ |
| | | { required: true, message: '请输入编号', trigger: 'blur' }, |
| | | { required: true, message: '请输入名称', trigger: 'blur' }, |
| | | ], |
| | | btmTypeName:[ |
| | | { required: true, message: '请选择业务类型', trigger: 'blur' }, |
| | |
| | | } |
| | | }, |
| | | watch:{ |
| | | TreeFlagCode:{ |
| | | handler(newval,oldval){ |
| | | console.log('TreeFlagCode',newval) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | //tab栏默认是表格 |
| | | mounted() { |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | // 关闭弹窗 |
| | | |
| | | /** 导入 */ |
| | | ImportExcel(){ |
| | | this.ThemeImportVisible=true; |
| | |
| | | 'conditionMap[id]':this.SelectFInd |
| | | } |
| | | this.MasterdefaultRend(masterParameter); |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | }else if(this.SelectValue == 'name'){ |
| | | const masterParameter={ |
| | | 'conditionMap[name]':this.SelectFInd |
| | | } |
| | | this.MasterdefaultRend(masterParameter) |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | } |
| | | }, |
| | | //编码规则确定 |
| | |
| | | 'conditionMap[id]':this.SelectFInd |
| | | } |
| | | this.KeydefaultRend(masterParameter); |
| | | this.SelectValue=""; |
| | | this.SelectFInd=""; |
| | | }else if(this.SelectValue == 'name'){ |
| | | const masterParameter={ |
| | | 'conditionMap[name]':this.SelectFInd |
| | | } |
| | | this.KeydefaultRend(masterParameter) |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | } |
| | | }, |
| | | //关键属性接口 |
| | |
| | | 'conditionMap[id]':this.SelectFInd |
| | | } |
| | | this.simdefaultRend(masterParameter); |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | }else if(this.SelectValue == 'name'){ |
| | | const masterParameter={ |
| | | 'conditionMap[name]':this.SelectFInd |
| | | } |
| | | this.simdefaultRend(masterParameter) |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | } |
| | | }, |
| | | // 相似项多选 |
| | |
| | | 'conditionMap[id]':this.SelectFInd |
| | | } |
| | | this.btmdefaultRend(masterParameter); |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | }else if(this.SelectValue == 'name'){ |
| | | const masterParameter={ |
| | | 'conditionMap[name]':this.SelectFInd |
| | | } |
| | | this.btmdefaultRend(masterParameter); |
| | | this.SelectValue=""; |
| | | this.SelectFInd=""; |
| | | } |
| | | }, |
| | | //业务类型多选 |
| | | btmSelect(row){ |
| | | this.masterRow=row.$index; |
| | | this.btmSelectList=row; |
| | | this.btmName=row[0].name; |
| | | this.btmOid=row[0].id; |
| | | this.btmName=row.name; |
| | | this.btmOid=row.id; |
| | | }, |
| | | //业务类型接口 |
| | | btmdefaultRend(masterParameter){ |
| | |
| | | loading.close(); |
| | | } |
| | | }, |
| | | //树节点取消事件 |
| | | TreeEscHandler(){ |
| | | this.TreeAddform={}; |
| | | this.TreeAddFormVisible=false |
| | | }, |
| | | //树节点添加事件 |
| | | TreeAddHandler() { |
| | | const data = this.TreeAddform; |
| | |
| | | }); |
| | | this.getAttr(); |
| | | this.TreeAddFormVisible = false; |
| | | //添加完成后右侧清空 |
| | | this.ProData=[]; |
| | | this.Formlist=[]; |
| | | }) |
| | | .catch((res) => { |
| | | this.$message({ |
| | |
| | | this.editTreeFLagCode = !data.parentId; |
| | | this.nodeClickList = data; |
| | | this.selectRow = 0; |
| | | this.crudArray=[] |
| | | try { |
| | | this.requestCount += 1; |
| | | const [res1, res2, res3] = await Promise.all([ |
| | |
| | | message: "添加成功!" |
| | | }); |
| | | done(row) |
| | | this.CrudRend() |
| | | this.TemRefresh(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'info', |
| | |
| | | //模板管理修改 |
| | | CrudRowUpdata(row,index,done) { |
| | | editSave(row).then(() => { |
| | | this.CrudRend() |
| | | this.TemRefresh(); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | |
| | | //模板管理删除 |
| | | CrudRowDel(row) { |
| | | deleteData(row).then(()=> { |
| | | this.CrudRend() |
| | | this.TemRefresh(); |
| | | }).catch(res => { |
| | | this.$message({ |
| | | type: 'info', |