| | |
| | | } |
| | | }) |
| | | } |
| | | //编码规则 |
| | | export const defaultReferDataGrid = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmEngineController/defaultReferDataGrid', |
| | |
| | | data:data |
| | | }) |
| | | } |
| | | //树修改 |
| | | export const TreeEditSave = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/editSave', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | //基本信息表单数据 |
| | | export const getObjectByOid = (oid) =>{ |
| | | return request({ |
| | |
| | | background-color: #f5f7fa !important; |
| | | } |
| | | } |
| | | |
| | | /deep/ .el-button { |
| | | margin: 0 10px 10px 0; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | <el-table-column v-for="item in this.option.column" :key="item.id" |
| | | :label="item.label" |
| | | :prop="item.prop" |
| | | :formatter="formAttr" |
| | | :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'" |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]" |
| | | @blur="saveRows"></el-input> |
| | | <el-switch |
| | | v-if="item.label === 'true' || item.label === 'false'" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949"> |
| | | </el-switch> |
| | | <span v-else>{{ row[item.prop] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | formAttr(row, column) { |
| | | console.log(row,column) |
| | | // if (column.property === "keyAttrFlag" |
| | | // ||column.property === "queryAttrFlag" |
| | | // ||column.property === "seniorQueryAttrFlag" |
| | | // ||column.property === "sameRepeatAttrFlag" |
| | | // ||column.property === "requireFlag" |
| | | // ||column.property === "formDisplayFlag" |
| | | // ||column.property === "tableDisplayFlag" |
| | | // ||column.property === "sortAttrFlag") { |
| | | // return row[column.property] =='true'? "是" : "否"; |
| | | // } |
| | | // return row[column.property]; |
| | | }, |
| | | //属性分组按钮 |
| | | attrVisibleHandle() { |
| | | this.formatBoolean() |
| | | if (this.CrudSelect.length > 1) { |
| | | this.$message.warning('只能选择一条模板属性') |
| | | } else if (this.CrudSelect < 1) { |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | <style scoped lang="scss"> |
| | | /deep/ .el-button { |
| | | margin: 0 10px 10px 0; |
| | | } |
| | | </style> |
| | |
| | | <div> |
| | | <avue-form v-model="loneTreeNewForm" :option="option" @submit="submit" v-if="flag == 'renonly'"> |
| | | </avue-form> |
| | | <avue-form v-model="loneTreeNewForm" :option="options" @submit="submit" v-else-if="flag == 'edit'"> |
| | | <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> |
| | | <div> |
| | | <el-input placeholder="请选择内容" v-model="masterInput" class="input-with-select"> |
| | | <el-select v-model="MasterSearchSelects" placeholder="请选择"> |
| | | <el-option label="英文名称" value="0"></el-option> |
| | | <el-option label="中文名称" value="1"></el-option> |
| | | </el-select> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </div> |
| | | <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> |
| | |
| | | |
| | | <script> |
| | | import {defaultReferDataGrid} from '@/api/MasterData/master' |
| | | import {TreeEditSave} from '@/api/template/templateAttr' |
| | | export default { |
| | | name: "classifyTreeform.vue", |
| | | props: ['loneTreeNewForm','flag'], |
| | | data() { |
| | | return { |
| | | name:"", |
| | | oid:"", |
| | | masterInput:'', |
| | | MasterSearchSelects:"", |
| | | masterData:[ |
| | | { |
| | | id:'001', |
| | | name:'001', |
| | | description:'001' |
| | | }, |
| | | { |
| | | id:'002', |
| | | name:'002', |
| | | description:'002' |
| | | } |
| | | ], |
| | | masterData:[], |
| | | masterOption:{ |
| | | addBtn:false, |
| | | index:true, |
| | | border:true, |
| | | selection:true, |
| | | menu:false, |
| | | height:380, |
| | | column:[ |
| | | { |
| | |
| | | { |
| | | 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: "主题库/分类名称", |
| | |
| | | ] |
| | | }, |
| | | options: { |
| | | submitBtn:false, |
| | | emptyBtn:false, |
| | | column: [ |
| | | { |
| | | label: '主题库/分类编号', |
| | |
| | | } |
| | | }, |
| | | 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) { |
| | |
| | | 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; |
| | | |
| | | }) |
| | | // if(this.masterSelectList.length>1){ |
| | | // this.$message.warning('只能选择一条数据') |
| | | // }else if(this.masterSelectList.length<=0){ |
| | | // this.$message.warning('请选择一条数据') |
| | | // }else { |
| | | // this.dialogVisible=false; |
| | | // console.log(this.masterInput) |
| | | // console.log(this.MasterSearchSelect) |
| | | // } |
| | | }, |
| | | masterSelect(row){ |
| | | console.log(row) |
| | | this.masterSelectList=row; |
| | | this.name=row[0].name; |
| | | this.oid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | } |
| | | } |
| | | } |
| | |
| | | mounted() { |
| | | this.type = this.tabOption.column[0]; |
| | | this.getAttr(); |
| | | console.log('11',this.nodeClickList) |
| | | }, |
| | | computed:{ |
| | | crudTreeOption(){ |
| | | return{ |
| | | index: true, |
| | | indexClassName:"序号", |
| | | indexLabelClassName:'序号', |
| | | border: true, |
| | | height:180, |
| | | selection:true, |
| | |
| | | }, |
| | | { |
| | | label:"版本号", |
| | | prop:"revisionSeq" |
| | | prop:"revisionSeq", |
| | | display:false |
| | | }, |
| | | { |
| | | label:"状态", |
| | | prop:"lcStatusText" |
| | | prop:"lcStatusText", |
| | | display:false |
| | | } |
| | | ] |
| | | } |
| | |
| | | this.crudArray=selection; |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | console.log(this.ProData) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | |
| | | }, |
| | | //修改回填 |
| | | TreeEdit() { |
| | | // if (this.nodeClickList == "") { |
| | | // this.$message({ |
| | | // type: 'warning', |
| | | // message: '请先从树上选择一条数据!' |
| | | // }); |
| | | // } else { |
| | | // this.TreeEditFormVisible = true; |
| | | // console.log('---',this.CloneTreedata) |
| | | // } |
| | | this.TreeEditFormVisible=true; |
| | | if (this.nodeClickList == "") { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请先从树上选择一条数据!' |
| | | }); |
| | | } else { |
| | | this.TreeEditFormVisible = true; |
| | | } |
| | | }, |
| | | //树刷新 |
| | | flushed() { |
| | |
| | | async nodeClick(data) { |
| | | //定义一个模板属性id,数据是模板管理表格里面的oid |
| | | this.nodeClickList = data |
| | | console.log(data) |
| | | this.ProData=[] |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | |
| | | } |
| | | }) |
| | | }).catch(res => { |
| | | console.log(res) |
| | | this.$message.error(res) |
| | | }) |
| | | // 基本信息表单数据 |
| | | await getObjectByOid(this.nodeClickList.oid).then(res => { |
| | |
| | | this.$message.error(res) |
| | | }) |
| | | } catch (error) { |
| | | console.log(error) |
| | | this.$message.error(error) |
| | | } |
| | | }, |
| | | //克隆模板树的点击切换数据 |
| | | async ClonenodeClick(data){ |
| | | this.ClonenodeClickList=data; |
| | | console.log("aaa",this.ClonenodeClickList.oid) |
| | | await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res=>{ |
| | | this.CloneFormlist = res.data.data.filter(item => { |
| | | if (item.codeclassifyoid != "") { |
| | |
| | | }); |
| | | done() |
| | | }).catch(res => { |
| | | console.log(res) |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | //模板管理删除 |
| | |
| | | }, |
| | | //模板管理表格查询 |
| | | EnterFind() { |
| | | console.log(this.Formlist) |
| | | if (this.FindText == "") { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data |
| | |
| | | </template> |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }} </div> |
| | | <el-button @click="visible=false">取 消</el-button> |
| | | <el-button @click="setValue" type="primary">确 定</el-button> |
| | | </div> |
| | |
| | | ids:{ |
| | | handler(newval,oldval){ |
| | | this.BuinessOids=newval; |
| | | this.HandlerRend() |
| | | this.BuinseseRend() |
| | | console.log(newval) |
| | | console.log(this.BuinessOids) |
| | | }, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | // this.HandlerRend() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods:{ |
| | | HandlerRend(){ |
| | | }, |
| | | BuinseseRend(){ |
| | | businese({ |
| | | btmType:'wupin', |
| | | 'conditionMap[oid]':this.BuinessOids.toString() |
| | |
| | | <el-card class="dialogwarp_tab_card"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="业务数据信息" name="first"> |
| | | <businesswork :ids="ids" :templateId="templateId"></businesswork> |
| | | <businesswork ref="businesswork":ids="ids" :templateId="templateId"></businesswork> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="流程跟踪" name="second"> |
| | | <avue-crud :data="flowList" :option="option" ref="crud"> |