| | |
| | | |
| | | export const update = (btmType) => { |
| | | return request({ |
| | | url: '/api/ubcs-omd/btm-type/submit/' + auto, |
| | | url: '/api/ubcs-omd/btm-type/submit/', |
| | | method: 'post', |
| | | data: btmType |
| | | }) |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //默认请求 |
| | | export const defaultRequestHandler =(defaultAttrType) => { |
| | | return request({ |
| | | url:'/api/ubcs-omd/btm-type/getDefaultAttr', |
| | | method:'get', |
| | | params:{ |
| | | defaultAttrType |
| | | } |
| | | }) |
| | | } |
| | |
| | | data:data |
| | | }) |
| | | } |
| | | //暂时有问题 |
| | | export const TreeObjcet = (oid) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassify/getObjectByOid', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | //启用 |
| | | export const TreeEnable = (data) =>{ |
| | | return request({ |
| | |
| | | return; |
| | | } |
| | | const Parameter = {}; |
| | | const DefaultParameter = {}; |
| | | Parameter[`conditionMap['${this.SelectValue}']`] = this.SelectSearchValue; |
| | | DefaultParameter[`conditionMap['${this.SelectValue}_like']`] = this.SelectSearchValue; |
| | | if(this.codeType === "btmCode"){ |
| | | this.btmDefaultRend(Parameter) |
| | | }else { |
| | | this.defaultSearchRend(Parameter); |
| | | this.defaultSearchRend(DefaultParameter); |
| | | } |
| | | }, |
| | | //表格行单选 |
| | |
| | | TreeSave, |
| | | TreeDel, |
| | | TreeCheckDel, |
| | | TreeObjcet, |
| | | TreeEnable, |
| | | TreeDeactivate, |
| | | gridCodeClassifyTemplate, |
| | |
| | | try { |
| | | this.requestCount += 1; |
| | | const [res1, res2, res3] = await Promise.all([ |
| | | TreeObjcet(data.oid), |
| | | getObjectByOid(data.oid), |
| | | gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}), |
| | | getObjectByOid(data.oid) |
| | | ]); |
| | | this.FlagObj = res1.data.data; |
| | | this.Formlist = res2.data.data.filter(item => { |
| | |
| | | this.ProData = []; |
| | | this.crudOid = '' |
| | | } |
| | | this.TreeEditObj = res3.data.data; |
| | | this.TreeEditObj = res1.data.data; |
| | | if (this.TreeEditObj.isParticipateCheck === null || this.TreeEditObj.isParticipateCheck === undefined || this.TreeEditObj.isParticipateCheck === "") { |
| | | this.$set(this.TreeEditObj, "isParticipateCheck", 1) |
| | | return |
| | |
| | | <el-container> |
| | | <el-aside style="width: 300px"> |
| | | <basic-container class="businessTreeContainer"> |
| | | <div class="app"style="overflow: auto;height: 84.3vh;"> |
| | | <div class="app"style="height: calc(100vh - 145px);"> |
| | | <div style="display: flex;margin-bottom: 10px;justify-content: space-around;"> |
| | | <el-button v-if="permissionList.addBtn" plain size="mini" type="primary" |
| | | @click="businessAdd"> |
| | |
| | | type="primary" @click="selectFromTable"> 从已有中获取 |
| | | </el-button> |
| | | </div> |
| | | <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 74.3vh" |
| | | @node-click="nodeClick"> |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark" |
| | | open-delay="250" |
| | | placement="top-start"> |
| | | <span> |
| | | <div style="height: calc(100vh - 220px);overflow: auto"> |
| | | <avue-tree :data="treeData" :option="treeOption" class="businessTree" |
| | | @node-click="nodeClick"> |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark" |
| | | open-delay="250" |
| | | placement="top-start"> |
| | | <span style="font-size: 15px;"> |
| | | <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | |
| | | </basic-container> |
| | |
| | | <!-- 属性列表--> |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">属性列表</p> |
| | | <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" class="attributeCrud"> |
| | | <!-- style="height: calc(100vh - 435px)"--> |
| | | <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" class="attributeCrud"> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | |
| | | selectionList: [], |
| | | treeData: [], |
| | | treeOption: { |
| | | height:'auto', |
| | | defaultExpandAll: false, |
| | | title: '业务类型树', |
| | | addBtn: false, |
| | |
| | | } |
| | | }, |
| | | addOption: { |
| | | btmType: {}, |
| | | btmEditType:{} |
| | | btmType: { |
| | | attributes:[] |
| | | }, |
| | | btmEditType:{ |
| | | attributes:[] |
| | | } |
| | | }, |
| | | loadOption: { |
| | | height: 'auto', |
| | | calcHeight: 0, |
| | | border: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | this.addOption.btmEditType = res.data.data; |
| | | // if(this.addOption.btmEditType.domainText){ |
| | | // this.$refs.btmEdit.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection'); |
| | | // } |
| | | // //版本规则 |
| | | // if(this.addOption.btmEditType.revisionRuleName && this.addOption.btmEditType.revisionRuleId){ |
| | | // this.$refs.btmEdit.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection'); |
| | | // } |
| | | // //生命周期 |
| | | // if(this.addOption.btmEditType.lifeCycleId && this.addOption.btmEditType.lifeCycleName){ |
| | | // this.$refs.btmEdit.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection') |
| | | // } |
| | | }) |
| | | } else { |
| | | this.$message.warning('请点击子节点'); |
| | |
| | | <template> |
| | | <template> |
| | | <el-dialog |
| | | title="业务类型" |
| | | :visible.sync="showSubmitDialog" |
| | | v-loading="loading" |
| | | :visible.sync="showSubmitDialog" |
| | | append-to-body |
| | | @close="closeSubmitDialog" |
| | | width="70%" |
| | | top="6vh" |
| | | style="height: 115vh;" |
| | | title="业务类型" |
| | | top="6vh" |
| | | width="70%" |
| | | @close="closeSubmitDialog" |
| | | > |
| | | <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm" |
| | | :rules="rules" @resetFields="resetForm" status-icon="true"> |
| | | <el-form-item label="英文名称" label-width="100px" required="true" prop="id"> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="false"></el-input> |
| | | <el-form ref="form" :model="btmType" :rules="rules" class="btmTypeForm" inline label-suffix=":" show-message="true" |
| | | size="medium" status-icon="true" @resetFields="resetForm"> |
| | | <el-form-item label="英文名称" label-width="100px" prop="id" required="true"> |
| | | <el-input v-model="btmType.id" :disabled="false" :prefix-icon="icons.key"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="中文名称" label-width="100px"> |
| | | <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input> |
| | |
| | | <!-- <el-form-item label="数据库表名" label-width="100px"> |
| | | <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item label="所属领域" label-width="100px" prop="domain" class="domainSelect"> |
| | | <el-select placeholder="请选择领域" v-model="btmType.bizDomain" :prefix-icon="icons.domain"> |
| | | <el-form-item class="domainSelect" label="所属领域" label-width="100px" prop="domain"> |
| | | <el-select v-model="btmType.bizDomain" :prefix-icon="icons.domain" placeholder="请选择领域" @change="domainChange"> |
| | | <el-option v-for="item in domainOption" |
| | | :label="item.label" :value="item.value" :key="item.value"> |
| | | :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="版本规则" label-width="100px"> |
| | | <el-input v-model="btmType.revisionRuleName" |
| | | :prefix-icon="icons.revisionRule" |
| | | class="revisionRule" |
| | | @focus="openRevision" |
| | | clearable |
| | | @clear="clearRevision" |
| | | :suffix-icon="icons.referType" |
| | | placeholder="请选择,留空则不进行管理"> |
| | | class="revisionRule" |
| | | clearable |
| | | placeholder="请选择,留空则不进行管理" |
| | | @change="ruleChange" |
| | | @clear="clearRevision" |
| | | @focus="openRevision"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生命周期" label-width="100px"> |
| | | <el-input v-model="btmType.lifeCycleName" |
| | | :prefix-icon="icons.lifeCycle" |
| | | class="lifeCycle" |
| | | @focus="openLifeCycle" |
| | | clearable |
| | | @clear="clearLifeCycle" |
| | | :suffix-icon="icons.referType" |
| | | placeholder="请选择,留空则不进行管理"> |
| | | class="lifeCycle" |
| | | clearable |
| | | placeholder="请选择,留空则不进行管理" |
| | | @clear="clearLifeCycle" |
| | | @focus="openLifeCycle"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <div>--> |
| | | <!-- <el-form-item label="开启视图" label-width="100px" class="viewFlag">--> |
| | | <!-- <el-switch v-model="btmType.viewFlag" active-color="#13ce66" @change="viewChange"></el-switch>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="视图语句" label-width="100px" class="viewInput">--> |
| | | <!-- <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </div>--> |
| | | <el-form-item label="描述" label-width="100px" class="description"> |
| | | <el-input v-model="btmType.description" |
| | | <!-- <div>--> |
| | | <!-- <el-form-item label="开启视图" label-width="100px" class="viewFlag">--> |
| | | <!-- <el-switch v-model="btmType.viewFlag" active-color="#13ce66" @change="viewChange"></el-switch>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="视图语句" label-width="100px" class="viewInput">--> |
| | | <!-- <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </div>--> |
| | | <el-form-item class="description" label="描述" label-width="100px"> |
| | | <el-input id="descId" |
| | | v-model="btmType.description" |
| | | :prefix-icon="icons.desc" |
| | | class="descClass" |
| | | id="descId" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <avue-crud :option="option" |
| | | <avue-crud ref="attrTable" |
| | | :data="btmType.attributes" |
| | | :page.sync="page" |
| | | ref="attrTable"> |
| | | <template slot-scope="scope" slot="menuLeft"> |
| | | <el-button type="danger" |
| | | icon="el-icon-plus" |
| | | :option="option" |
| | | :page.sync="page"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" |
| | | size="small" |
| | | type="danger" |
| | | @click="rowAdd()">属性选择 |
| | | </el-button> |
| | | </template> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | <el-tag v-if=" row.attrDataTypeText">{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | <template slot="isDefaultAttr" slot-scope="{row}"> |
| | | <el-tag v-if="row.isDefaultAttr" type="success">是</el-tag> |
| | | <el-tag v-else type="danger">否</el-tag> |
| | | </template> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">编辑 |
| | | <el-button v-if="!row.$cellEdit" icon="el-icon-edit" size="small" type="text" @click="cellEditClick(row,index)"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" |
| | | <el-button v-if="!row.$cellEdit" icon="el-icon-delete" size="small" type="text" |
| | | @click="removeFormAttrTable(row,index)">移除 |
| | | </el-button> |
| | | <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)"> |
| | | <el-button v-if="row.$cellEdit" icon="el-icon-check" size="small" type="text" @click="cellEditSave(row,index)"> |
| | | 保存 |
| | | </el-button> |
| | | </template> |
| | |
| | | </div> |
| | | |
| | | <!-- 属性池的选择 --> |
| | | <el-dialog title="属性池" |
| | | :visible="attrRef.visible" |
| | | <el-dialog :visible="attrRef.visible" |
| | | append-to-body |
| | | @close="closeAttrDialog" |
| | | title="属性池" |
| | | width="80%" |
| | | @close="closeAttrDialog" |
| | | > |
| | | <avue-crud class="attrRef" |
| | | :option="attrRef.option" |
| | | <avue-crud ref="attrRef" |
| | | v-loading="attrRef.loading" |
| | | :data="attrRef.data" |
| | | :option="attrRef.option" |
| | | :page.sync="attrRef.page" |
| | | ref="attrRef" |
| | | class="attrRef" |
| | | @on-load="attrRefOnLoad" |
| | | @search-change="attrRefSearch" |
| | | @selection-change="selectionChange" |
| | | v-loading="attrRef.loading"> |
| | | @selection-change="selectionChange"> |
| | | <template slot="typeValue" slot-scope="scope"> |
| | | <el-tag>{{ scope.row.typeValue }}</el-tag> |
| | | <el-tag v-if="scope.row.typeValue">{{ scope.row.typeValue }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 版本规则的参照 --> |
| | | <el-dialog title="请选择版本规则" |
| | | :visible.sync="revisionRef.visible" |
| | | <el-dialog :visible.sync="revisionRef.visible" |
| | | append-to-body |
| | | title="请选择版本规则" |
| | | width="80%"> |
| | | |
| | | <avue-crud class="revisionRef" |
| | | :option="revisionRef.option" |
| | | :data="revisionRef.data" |
| | | :page.sync="revisionRef.page" |
| | | ref="revisionRef" |
| | | @row-click="revisionClick" |
| | | <avue-crud ref="revisionRef" |
| | | v-loading="revisionRef.loading" |
| | | @search-change="searchRevisionRule" |
| | | :data="revisionRef.data" |
| | | :option="revisionRef.option" |
| | | :page.sync="revisionRef.page" |
| | | class="revisionRef" |
| | | @row-click="revisionClick" |
| | | @search-change="searchRevisionRule" |
| | | @search-reset="clearSearchRevisionRule"> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 生命周期的参照 --> |
| | | <el-dialog title="请选择生命周期" |
| | | :visible.sync="lifeCycleRef.visible" |
| | | <el-dialog :visible.sync="lifeCycleRef.visible" |
| | | append-to-body |
| | | title="请选择生命周期" |
| | | width="80%"> |
| | | |
| | | <avue-crud class="lifeCycleRef" |
| | | :option="lifeCycleRef.option" |
| | | :data="lifeCycleRef.data" |
| | | :page.sync="lifeCycleRef.page" |
| | | ref="lifeCycleRef" |
| | | @row-click="lifeCycleClick" |
| | | <avue-crud ref="lifeCycleRef" |
| | | v-loading="lifeCycleRef.loading" |
| | | @search-change="searchLifeCycle" |
| | | :data="lifeCycleRef.data" |
| | | :option="lifeCycleRef.option" |
| | | :page.sync="lifeCycleRef.page" |
| | | class="lifeCycleRef" |
| | | @row-click="lifeCycleClick" |
| | | @search-change="searchLifeCycle" |
| | | @search-reset="clearSearchLifeCycle"> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | |
| | | |
| | | <script> |
| | | |
| | | import {add, update} from '@/api/omd/btmType'; |
| | | import {add, update, defaultRequestHandler} from '@/api/omd/btmType'; |
| | | import {queryPage} from '@/api/omd/OmdAttribute'; |
| | | import {getPage} from '@/api/omd/revisionRule'; |
| | | import {getList} from '@/api/modeling/cycle'; |
| | |
| | | props: { |
| | | btmType: { |
| | | type: Object, |
| | | default:{} |
| | | default: {} |
| | | }, |
| | | domainOption: { |
| | | type: Array |
| | |
| | | type: Array |
| | | }, |
| | | type: { |
| | | type:String, |
| | | type: String, |
| | | }, |
| | | btmEditType:{ |
| | | type:Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | | watch: {}, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | loading:false, |
| | | loading: false, |
| | | showSubmitDialog: false, |
| | | option: { |
| | | height: "330px", |
| | |
| | | editBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | refreshBtn: false, |
| | | menuWidth: 150, |
| | | addBtn: false, |
| | | highlightCurrentRow: true, |
| | |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | align: 'center', |
| | | disabled:true |
| | | disabled: true |
| | | }, { |
| | | label: '中文名称', |
| | | prop: 'name', |
| | | align: 'center', |
| | | cell: true |
| | | },{ |
| | | }, { |
| | | label: "类型", |
| | | prop: "attrDataTypeText", |
| | | align: 'center', |
| | |
| | | prop: "description", |
| | | align: 'center', |
| | | cell: true |
| | | }, |
| | | { |
| | | label: '默认字段', |
| | | prop: 'isDefaultAttr', |
| | | align: 'center', |
| | | cell: true, |
| | | slot: true |
| | | } |
| | | ] |
| | | }, |
| | |
| | | prop: 'id', |
| | | align: 'left', |
| | | search: true, |
| | | disabled:true, |
| | | disabled: true, |
| | | width: 230 |
| | | }, { |
| | | label: '中文名称', |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | disabled:true, |
| | | disabled: true, |
| | | search: true |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | disabled:true, |
| | | disabled: true, |
| | | search: true |
| | | }, |
| | | { |
| | |
| | | {required: true, message: '请选择所属领域', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | domainData: [], |
| | | ruleData: [], |
| | | lifeData: [], |
| | | domainFirstSelection: true, |
| | | ruleFirstSelection: true, |
| | | lifeCycleSelection: true, |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | getDefaultData(requestType, dataName, selectionName) { |
| | | if (this[selectionName]) { |
| | | defaultRequestHandler(requestType).then(res => { |
| | | this[dataName] = res.data.data; |
| | | res.data.data.forEach(item => { |
| | | let data = { |
| | | id: item.id, |
| | | name: item.name, |
| | | attrDataType: item.attrDataType, |
| | | attrDataTypeText: item.attrDataTypeText, |
| | | defaultValue: item.defaultValue, |
| | | description: item.description, |
| | | attributeLength: item.attributeLength, |
| | | referBtmTypeId: item.referTypeCode, |
| | | referBtmTypeName: item.referToName, |
| | | enumId: item.dictCode, |
| | | isDefaultAttr: item.isDefaultAttr |
| | | } |
| | | if (!this.btmType.attributes) { |
| | | this.btmType.attributes = []; |
| | | } |
| | | this.btmType.attributes.push(data); |
| | | }) |
| | | this.attrRefOnLoad() |
| | | this[selectionName] = false; |
| | | }); |
| | | } |
| | | }, |
| | | //所属领域change |
| | | domainChange() { |
| | | this.getDefaultData('defaultAttr', 'domainData', 'domainFirstSelection'); |
| | | }, |
| | | //版本规则change |
| | | ruleHandler() { |
| | | this.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection'); |
| | | }, |
| | | //生命周期change |
| | | lifeCycleHandler() { |
| | | this.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection'); |
| | | }, |
| | | //默认值请求 |
| | | defaultValueRequest() { |
| | | |
| | | }, |
| | | // 关闭组件弹窗 |
| | | closeSubmitDialog() { |
| | | this.showSubmitDialog = false; |
| | | // this.btmType.attributes = []; |
| | | // this.btmType = {}; |
| | | // this.attrRef.selectData = []; |
| | | // this.attrRef.queryNotIn = null; |
| | | // this.resetForm(); |
| | | //所属领域状态重新赋值 |
| | | this.domainFirstSelection = true; |
| | | //版本规则状态重新赋值 |
| | | this.ruleFirstSelection = true; |
| | | //生命周期状态重新赋值 |
| | | this.lifeCycleSelection = true; |
| | | //重置校验规则 |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | // 关闭属性池查询弹窗 |
| | | closeAttrDialog() { |
| | |
| | | const data = res.data.data; |
| | | this.attrRef.page.total = data.total; |
| | | this.attrRef.data = data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | this.attrRef.loading = false; |
| | | }, 600) |
| | | this.$nextTick(() => { |
| | | this.$refs.attrRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // 属性池检索 |
| | |
| | | // 添加业务类型 |
| | | submitBtmType() { |
| | | // console.log(this.btmType); |
| | | if (!this.btmType.attributes){ |
| | | this.$message.warning("还没有为业务类型选择属性"); |
| | | return; |
| | | }else{ |
| | | if (!this.btmType.attributes) { |
| | | this.$message.warning("还没有为业务类型选择属性"); |
| | | return; |
| | | } else { |
| | | let nullFlag = false; |
| | | this.btmType.attributes.forEach(item => { |
| | | if (!item.name){ |
| | | this.$message.warning("第" + (item.$index+1) + "行的中文名称不能为空"); |
| | | nullFlag = true; |
| | | return; |
| | | } |
| | | }) |
| | | if (nullFlag){ |
| | | this.btmType.attributes.forEach(item => { |
| | | if (!item.name) { |
| | | this.$message.warning("第" + (item.$index + 1) + "行的中文名称不能为空"); |
| | | nullFlag = true; |
| | | return; |
| | | } |
| | | }) |
| | | if (nullFlag) { |
| | | return; |
| | | } |
| | | |
| | | } |
| | | this.btmType.attributes = this.btmType.attributes.filter(item => !item.isDefaultAttr); |
| | | add(this.btmType, true).then(res => { |
| | | // 添加完成,回调父组件的刷新 |
| | | this.$message.success('保存成功'); |
| | |
| | | cell.$cellEdit = true; |
| | | }, |
| | | // 列表编辑保存 |
| | | cellEditSave(row,index) { |
| | | cellEditSave(row, index) { |
| | | this.btmType.attributes[index].name = row.name |
| | | this.btmType.attributes[index].defaultValue = row.defaultValue; |
| | | this.btmType.attributes[index].description = row.description; |
| | |
| | | this.$refs.attrTable.refreshTable(); |
| | | }, |
| | | // 打开版本规则参照 |
| | | openRevision() { |
| | | openRevision() { |
| | | this.revisionRef.visible = true; |
| | | this.revisionRuleOnLoad(); |
| | | }, |
| | | // 版本参照列表的默认查询方法 |
| | | revisionRuleOnLoad(){ |
| | | revisionRuleOnLoad() { |
| | | this.revisionRef.loading = true; |
| | | getPage().then(res => { |
| | | this.revisionRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | this.revisionRef.loading = false; |
| | | }, 600) |
| | | this.$nextTick(() => { |
| | | this.$refs.revisionRef.refreshTable(); |
| | | }); |
| | | |
| | | // this.$nextTick(() => { |
| | | // this.$refs.revisionRef.refreshTable(); |
| | | // }); |
| | | }, |
| | | // 打开版本规则参照 |
| | | openLifeCycle() { |
| | |
| | | this.lifeCycleOnLoad(); |
| | | }, |
| | | // 生命周期列表的默认查询方法 |
| | | lifeCycleOnLoad(){ |
| | | lifeCycleOnLoad() { |
| | | this.lifeCycleRef.loading = true; |
| | | getList().then(res => { |
| | | this.lifeCycleRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | this.lifeCycleRef.loading = false; |
| | | }, 600) |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.$refs.lifeCycleRef.refreshTable(); |
| | | }); |
| | |
| | | this.btmType.revisionRuleId = this.revisionRef.selectData.id; |
| | | this.btmType.revisionRuleName = this.revisionRef.selectData.name; |
| | | this.btmType.inputRevisionFlag = false; |
| | | this.ruleHandler() |
| | | this.cancelRevision(); |
| | | |
| | | }, |
| | | // 确认选中生命周期 |
| | | confirmLifeCycle() { |
| | |
| | | this.btmType.lifeCycleId = this.lifeCycleRef.selectData.id; |
| | | this.btmType.lifeCycleName = this.lifeCycleRef.selectData.name; |
| | | this.cancelLifeCycle(); |
| | | this.lifeCycleHandler() |
| | | }, |
| | | // 取消选中版本规则 |
| | | cancelRevision() { |
| | |
| | | * @param params 搜索框输入值 {id: '',name: ''} 直接获取就行 |
| | | * @param done 执行完成后的回调 |
| | | */ |
| | | searchRevisionRule(params,done){ |
| | | searchRevisionRule(params, done) { |
| | | let condition = {}; |
| | | if (params.id){ |
| | | condition['id_like'] = params.id; |
| | | if (params.id) { |
| | | condition['id_like'] = params.id; |
| | | } |
| | | if (params.name){ |
| | | condition['name_like'] = params.name; |
| | | if (params.name) { |
| | | condition['name_like'] = params.name; |
| | | } |
| | | this.revisionRef.loading = true; |
| | | getPage(this.revisionRef.page.currentPage,this.revisionRef.page.pageSize,condition).then(res => { |
| | | getPage(this.revisionRef.page.currentPage, this.revisionRef.page.pageSize, condition).then(res => { |
| | | this.revisionRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | |
| | | * @param params 搜索框输入值 |
| | | * @param done 执行完成后的回调 |
| | | */ |
| | | searchLifeCycle(params,done){ |
| | | searchLifeCycle(params, done) { |
| | | let condition = {}; |
| | | if (params.id){ |
| | | if (params.id) { |
| | | condition['id_like'] = params.id; |
| | | } |
| | | if (params.name){ |
| | | if (params.name) { |
| | | condition['name_like'] = params.name; |
| | | } |
| | | this.lifeCycleRef.loading = true; |
| | | getList(this.lifeCycleRef.page.currentPage,this.lifeCycleRef.page.pageSize,condition).then(res => { |
| | | getList(this.lifeCycleRef.page.currentPage, this.lifeCycleRef.page.pageSize, condition).then(res => { |
| | | this.lifeCycleRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | |
| | | }); |
| | | }, |
| | | // 取消版本规则搜索 |
| | | clearSearchRevisionRule(item){ |
| | | clearSearchRevisionRule(item) { |
| | | this.revisionRuleOnLoad(); |
| | | }, |
| | | // 取消生命周期搜索 |
| | | clearSearchLifeCycle(item){ |
| | | clearSearchLifeCycle(item) { |
| | | this.lifeCycleOnLoad(); |
| | | console.log(item); |
| | | } |
| | |
| | | <template> |
| | | <el-dialog |
| | | title="业务类型" |
| | | :visible.sync="showSubmitDialog" |
| | | v-loading="loading" |
| | | :visible.sync="showSubmitDialog" |
| | | append-to-body |
| | | @close="closeSubmitDialog" |
| | | width="70%" |
| | | top="6vh" |
| | | style="height: 115vh;" |
| | | title="业务类型" |
| | | top="6vh" |
| | | width="70%" |
| | | @close="closeSubmitDialog" |
| | | > |
| | | <el-form ref="form" :model="btmEditType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm" |
| | | :rules="rules" @resetFields="resetForm" status-icon="true"> |
| | | <el-form-item label="英文名称" label-width="100px" prop="id"> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="true"></el-input> |
| | | <el-form ref="form" :model="btmType" :rules="rules" class="btmTypeForm" inline label-suffix=":" |
| | | show-message="true" |
| | | size="medium" status-icon="true" @resetFields="resetForm"> |
| | | <el-form-item label="英文名称" label-width="100px" prop="id"> |
| | | <el-input v-model="btmType.id" :disabled="true" :prefix-icon="icons.key"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="中文名称" label-width="100px"> |
| | | <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input> |
| | |
| | | <!-- <el-form-item label="数据库表名" label-width="100px"> |
| | | <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item label="所属领域" label-width="100px" prop="domain" class="domainSelect"> |
| | | <el-select placeholder="请选择领域" v-model="btmType.bizDomain" :prefix-icon="icons.domain"> |
| | | <el-form-item class="domainSelect" label="所属领域" label-width="100px" prop="domain"> |
| | | <el-select v-model="btmType.bizDomain" :prefix-icon="icons.domain" placeholder="请选择领域" @change="domainChange"> |
| | | <el-option v-for="item in domainOption" |
| | | :label="item.label" :value="item.value" :key="item.value"> |
| | | :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="版本规则" label-width="100px"> |
| | | <el-input v-model="btmType.revisionRuleName" |
| | | :prefix-icon="icons.revisionRule" |
| | | class="revisionRule" |
| | | @focus="openRevision" |
| | | clearable |
| | | @clear="clearRevision" |
| | | :suffix-icon="icons.referType" |
| | | placeholder="请选择,留空则不进行管理"> |
| | | class="revisionRule" |
| | | clearable |
| | | placeholder="请选择,留空则不进行管理" |
| | | @clear="clearRevision" |
| | | @focus="openRevision"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生命周期" label-width="100px"> |
| | | <el-input v-model="btmType.lifeCycleName" |
| | | :prefix-icon="icons.lifeCycle" |
| | | class="lifeCycle" |
| | | @focus="openLifeCycle" |
| | | clearable |
| | | @clear="clearLifeCycle" |
| | | :suffix-icon="icons.referType" |
| | | placeholder="请选择,留空则不进行管理"> |
| | | class="lifeCycle" |
| | | clearable |
| | | placeholder="请选择,留空则不进行管理" |
| | | @clear="clearLifeCycle" |
| | | @focus="openLifeCycle"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <div>--> |
| | |
| | | <!-- <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </div>--> |
| | | <el-form-item label="描述" label-width="100px" class="description"> |
| | | <el-input v-model="btmType.description" |
| | | <el-form-item class="description" label="描述" label-width="100px"> |
| | | <el-input id="descId" |
| | | v-model="btmType.description" |
| | | :prefix-icon="icons.desc" |
| | | class="descClass" |
| | | id="descId" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <avue-crud :option="option" |
| | | <avue-crud ref="attrTable" |
| | | :data="btmType.attributes" |
| | | :page.sync="page" |
| | | ref="attrTable"> |
| | | <template slot-scope="scope" slot="menuLeft"> |
| | | <el-button type="danger" |
| | | icon="el-icon-plus" |
| | | :option="option" |
| | | :page.sync="page"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" |
| | | size="small" |
| | | type="danger" |
| | | @click="rowAdd()">属性选择 |
| | | </el-button> |
| | | </template> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | <el-tag v-if="row.attrDataTypeText">{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | <template slot="isDefaultAttr" slot-scope="{row}"> |
| | | <el-tag v-if="row.isDefaultAttr" type="success">是</el-tag> |
| | | <el-tag v-else type="danger">否</el-tag> |
| | | </template> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">编辑 |
| | | <el-button v-if="!row.$cellEdit" icon="el-icon-edit" size="small" type="text" @click="cellEditClick(row,index)"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" |
| | | <el-button v-if="!row.$cellEdit" icon="el-icon-delete" size="small" type="text" |
| | | @click="removeFormAttrTable(row,index)">移除 |
| | | </el-button> |
| | | <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)"> |
| | | <el-button v-if="row.$cellEdit" icon="el-icon-check" size="small" type="text" @click="cellEditSave(row,index)"> |
| | | 保存 |
| | | </el-button> |
| | | </template> |
| | |
| | | </div> |
| | | |
| | | <!-- 属性池的选择 --> |
| | | <el-dialog title="属性池" |
| | | :visible="attrRef.visible" |
| | | <el-dialog :visible="attrRef.visible" |
| | | append-to-body |
| | | @close="closeAttrDialog" |
| | | title="属性池" |
| | | width="80%" |
| | | @close="closeAttrDialog" |
| | | > |
| | | <avue-crud class="attrRef" |
| | | :option="attrRef.option" |
| | | <avue-crud ref="attrRef" |
| | | v-loading="attrRef.loading" |
| | | :data="attrRef.data" |
| | | :option="attrRef.option" |
| | | :page.sync="attrRef.page" |
| | | ref="attrRef" |
| | | class="attrRef" |
| | | @on-load="attrRefOnLoad" |
| | | @search-change="attrRefSearch" |
| | | @selection-change="selectionChange" |
| | | v-loading="attrRef.loading"> |
| | | @selection-change="selectionChange"> |
| | | <template slot="typeValue" slot-scope="scope"> |
| | | <el-tag>{{ scope.row.typeValue }}</el-tag> |
| | | <el-tag v-if="scope.row.typeValue">{{ scope.row.typeValue }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 版本规则的参照 --> |
| | | <el-dialog title="请选择版本规则" |
| | | :visible.sync="revisionRef.visible" |
| | | <el-dialog :visible.sync="revisionRef.visible" |
| | | append-to-body |
| | | title="请选择版本规则" |
| | | width="80%"> |
| | | |
| | | <avue-crud class="revisionRef" |
| | | :option="revisionRef.option" |
| | | :data="revisionRef.data" |
| | | :page.sync="revisionRef.page" |
| | | ref="revisionRef" |
| | | @row-click="revisionClick" |
| | | <avue-crud ref="revisionRef" |
| | | v-loading="revisionRef.loading" |
| | | :data="revisionRef.data" |
| | | :option="revisionRef.option" |
| | | :page.sync="revisionRef.page" |
| | | class="revisionRef" |
| | | @row-click="revisionClick" |
| | | @search-change="searchRevisionRule" |
| | | @search-reset="clearSearchRevisionRule"> |
| | | <template slot="radio" |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 生命周期的参照 --> |
| | | <el-dialog title="请选择生命周期" |
| | | :visible.sync="lifeCycleRef.visible" |
| | | <el-dialog :visible.sync="lifeCycleRef.visible" |
| | | append-to-body |
| | | title="请选择生命周期" |
| | | width="80%"> |
| | | |
| | | <avue-crud class="lifeCycleRef" |
| | | :option="lifeCycleRef.option" |
| | | :data="lifeCycleRef.data" |
| | | :page.sync="lifeCycleRef.page" |
| | | ref="lifeCycleRef" |
| | | @row-click="lifeCycleClick" |
| | | <avue-crud ref="lifeCycleRef" |
| | | v-loading="lifeCycleRef.loading" |
| | | :data="lifeCycleRef.data" |
| | | :option="lifeCycleRef.option" |
| | | :page.sync="lifeCycleRef.page" |
| | | class="lifeCycleRef" |
| | | @row-click="lifeCycleClick" |
| | | @search-change="searchLifeCycle" |
| | | @search-reset="clearSearchLifeCycle"> |
| | | <template slot="radio" |
| | |
| | | |
| | | <script> |
| | | |
| | | import {add, update} from '@/api/omd/btmType'; |
| | | import {add, defaultRequestHandler, update} from '@/api/omd/btmType'; |
| | | import {queryPage} from '@/api/omd/OmdAttribute'; |
| | | import {getPage} from '@/api/omd/revisionRule'; |
| | | import {getList} from '@/api/modeling/cycle'; |
| | |
| | | props: { |
| | | btmType: { |
| | | type: Object, |
| | | default:{} |
| | | default: {} |
| | | }, |
| | | domainOption: { |
| | | type: Array |
| | |
| | | type: Array |
| | | }, |
| | | type: { |
| | | type:String, |
| | | type: String, |
| | | }, |
| | | btmEditType:{ |
| | | type:Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | btmType(newval) { |
| | | if (newval) { |
| | | //所属领域 |
| | | if (newval.domainText) { |
| | | this.getDefaultData('defaultAttr', 'domainData', 'domainFirstSelection', 'get'); |
| | | }else { |
| | | this.domainFirstValue = false; |
| | | } |
| | | //版本规则 |
| | | if (newval.revisionRuleName && newval.revisionRuleId) { |
| | | this.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection', 'get'); |
| | | }else { |
| | | this.ruleFirstValue = false; |
| | | } |
| | | //生命周期 |
| | | if (newval.lifeCycleId && newval.lifeCycleName) { |
| | | this.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection', 'get'); |
| | | }else { |
| | | this.lifeCycleValue = false; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | loading:false, |
| | | loading: false, |
| | | showSubmitDialog: false, |
| | | option: { |
| | | height: "330px", |
| | |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | menuWidth: 150, |
| | | refreshBtn:false, |
| | | refreshBtn: false, |
| | | addBtn: false, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | align: 'center', |
| | | disabled:true |
| | | disabled: true |
| | | }, { |
| | | label: '中文名称', |
| | | prop: 'name', |
| | | align: 'center', |
| | | cell: true |
| | | },{ |
| | | }, { |
| | | label: "类型", |
| | | prop: "attrDataTypeText", |
| | | align: 'center', |
| | |
| | | prop: "description", |
| | | align: 'center', |
| | | cell: true |
| | | }, |
| | | { |
| | | label: '默认字段', |
| | | prop: 'isDefaultAttr', |
| | | align: 'center', |
| | | cell: true, |
| | | slot: true |
| | | } |
| | | ] |
| | | }, |
| | |
| | | prop: 'id', |
| | | align: 'left', |
| | | search: true, |
| | | disabled:true, |
| | | disabled: true, |
| | | width: 230 |
| | | }, { |
| | | label: '中文名称', |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | disabled:true, |
| | | disabled: true, |
| | | search: true |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | disabled:true, |
| | | disabled: true, |
| | | search: true |
| | | }, |
| | | { |
| | |
| | | {required: true, message: '请选择所属领域', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | domainData: [], |
| | | ruleData: [], |
| | | lifeData: [], |
| | | domainFirstSelection: true, |
| | | domainFirstValue: true, |
| | | ruleFirstSelection: true, |
| | | ruleFirstValue: true, |
| | | lifeCycleSelection: true, |
| | | lifeCycleValue: true, |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | //所属领域change |
| | | domainChange(){ |
| | | if(!this.domainFirstValue){ |
| | | this.getDefaultData('defaultAttr', 'domainData', 'domainFirstSelection', 'detail'); |
| | | this.domainFirstValue = true; |
| | | } |
| | | }, |
| | | getDefaultData(requestType, dataName, selectionName, type) { |
| | | if (type === 'get') { |
| | | defaultRequestHandler(requestType).then(res => { |
| | | this[dataName] = res.data.data; |
| | | res.data.data.forEach(item => { |
| | | let data = { |
| | | id: item.id, |
| | | name: item.name, |
| | | attrDataType: item.attrDataType, |
| | | attrDataTypeText: item.attrDataTypeText, |
| | | defaultValue: item.defaultValue, |
| | | description: item.description, |
| | | attributeLength: item.attributeLength, |
| | | referBtmTypeId: item.referTypeCode, |
| | | referBtmTypeName: item.referToName, |
| | | enumId: item.dictCode, |
| | | isDefaultAttr: item.isDefaultAttr |
| | | } |
| | | if (!this.btmType.attributes) { |
| | | this.btmType.attributes = []; |
| | | } |
| | | // 获取重复的id |
| | | let isIds = this.btmType.attributes.filter(attr => attr.id === data.id); |
| | | if (isIds.length === 0) { |
| | | this.btmType.attributes.push(data); |
| | | } |
| | | }) |
| | | this.attrRefOnLoad() |
| | | }); |
| | | } else { |
| | | if (this[selectionName]) { |
| | | defaultRequestHandler(requestType).then(res => { |
| | | this[dataName] = res.data.data; |
| | | res.data.data.forEach(item => { |
| | | let data = { |
| | | id: item.id, |
| | | name: item.name, |
| | | attrDataType: item.attrDataType, |
| | | attrDataTypeText: item.attrDataTypeText, |
| | | defaultValue: item.defaultValue, |
| | | description: item.description, |
| | | attributeLength: item.attributeLength, |
| | | referBtmTypeId: item.referTypeCode, |
| | | referBtmTypeName: item.referToName, |
| | | enumId: item.dictCode, |
| | | isDefaultAttr: item.isDefaultAttr |
| | | } |
| | | if (!this.btmType.attributes) { |
| | | this.btmType.attributes = []; |
| | | } |
| | | this.btmType.attributes.push(data); |
| | | }) |
| | | this.attrRefOnLoad() |
| | | this[selectionName] = false; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // 关闭组件弹窗 |
| | | closeSubmitDialog() { |
| | | this.showSubmitDialog = false; |
| | |
| | | const data = res.data.data; |
| | | this.attrRef.page.total = data.total; |
| | | this.attrRef.data = data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | this.attrRef.loading = false; |
| | | }, 600) |
| | | this.$nextTick(() => { |
| | | this.$refs.attrRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // 属性池检索 |
| | |
| | | // 添加业务类型 |
| | | submitBtmType() { |
| | | // console.log(this.btmType); |
| | | if (!this.btmType.attributes){ |
| | | if (!this.btmType || !this.btmType.attributes) { |
| | | this.$message.warning("还没有为业务类型选择属性"); |
| | | return; |
| | | }else{ |
| | | let nullFlag = false; |
| | | this.btmType.attributes.forEach(item => { |
| | | if (!item.name){ |
| | | this.$message.warning("第" + (item.$index+1) + "行的中文名称不能为空"); |
| | | nullFlag = true; |
| | | return; |
| | | } |
| | | }) |
| | | if (nullFlag){ |
| | | return; |
| | | } |
| | | |
| | | } |
| | | add(this.btmType, true).then(res => { |
| | | const hasEmptyName = this.btmType.attributes.some(item => !item.name); |
| | | if (hasEmptyName) { |
| | | this.$message.warning('请检查表格中是否存在中文名称为空!') |
| | | return; |
| | | } |
| | | this.btmType.attributes = this.btmType.attributes.filter(item => !item.isDefaultAttr); |
| | | add(this.btmType,true).then(res => { |
| | | // 添加完成,回调父组件的刷新 |
| | | this.$message.success('保存成功'); |
| | | this.cancleSubmitBtmType(); |
| | |
| | | cell.$cellEdit = true; |
| | | }, |
| | | // 列表编辑保存 |
| | | cellEditSave(row,index) { |
| | | cellEditSave(row, index) { |
| | | this.btmType.attributes[index].name = row.name |
| | | this.btmType.attributes[index].defaultValue = row.defaultValue; |
| | | this.btmType.attributes[index].description = row.description; |
| | |
| | | this.revisionRuleOnLoad(); |
| | | }, |
| | | // 版本参照列表的默认查询方法 |
| | | revisionRuleOnLoad(){ |
| | | revisionRuleOnLoad() { |
| | | this.revisionRef.loading = true; |
| | | getPage().then(res => { |
| | | this.revisionRef.data = res.data.data.records; |
| | |
| | | this.lifeCycleOnLoad(); |
| | | }, |
| | | // 生命周期列表的默认查询方法 |
| | | lifeCycleOnLoad(){ |
| | | lifeCycleOnLoad() { |
| | | this.lifeCycleRef.loading = true; |
| | | getList().then(res => { |
| | | this.lifeCycleRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | this.lifeCycleRef.loading = false; |
| | | }, 600) |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.$refs.lifeCycleRef.refreshTable(); |
| | | }); |
| | |
| | | this.btmType.revisionRuleId = this.revisionRef.selectData.id; |
| | | this.btmType.revisionRuleName = this.revisionRef.selectData.name; |
| | | this.btmType.inputRevisionFlag = false; |
| | | if(!this.ruleFirstValue){ |
| | | this.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection', 'detail'); |
| | | this.ruleFirstValue = true; |
| | | } |
| | | this.cancelRevision(); |
| | | }, |
| | | // 确认选中生命周期 |
| | |
| | | this.btmType.lifeCycleFlag = true; |
| | | this.btmType.lifeCycleId = this.lifeCycleRef.selectData.id; |
| | | this.btmType.lifeCycleName = this.lifeCycleRef.selectData.name; |
| | | if(!this.lifeCycleValue){ |
| | | this.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection', 'detail'); |
| | | this.lifeCycleValue = true; |
| | | } |
| | | this.cancelLifeCycle(); |
| | | }, |
| | | // 取消选中版本规则 |
| | |
| | | * @param params 搜索框输入值 {id: '',name: ''} 直接获取就行 |
| | | * @param done 执行完成后的回调 |
| | | */ |
| | | searchRevisionRule(params,done){ |
| | | searchRevisionRule(params, done) { |
| | | let condition = {}; |
| | | if (params.id){ |
| | | if (params.id) { |
| | | condition['id_like'] = params.id; |
| | | } |
| | | if (params.name){ |
| | | if (params.name) { |
| | | condition['name_like'] = params.name; |
| | | } |
| | | this.revisionRef.loading = true; |
| | | getPage(this.revisionRef.page.currentPage,this.revisionRef.page.pageSize,condition).then(res => { |
| | | getPage(this.revisionRef.page.currentPage, this.revisionRef.page.pageSize, condition).then(res => { |
| | | this.revisionRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | |
| | | * @param params 搜索框输入值 |
| | | * @param done 执行完成后的回调 |
| | | */ |
| | | searchLifeCycle(params,done){ |
| | | searchLifeCycle(params, done) { |
| | | let condition = {}; |
| | | if (params.id){ |
| | | if (params.id) { |
| | | condition['id_like'] = params.id; |
| | | } |
| | | if (params.name){ |
| | | if (params.name) { |
| | | condition['name_like'] = params.name; |
| | | } |
| | | this.lifeCycleRef.loading = true; |
| | | getList(this.lifeCycleRef.page.currentPage,this.lifeCycleRef.page.pageSize,condition).then(res => { |
| | | getList(this.lifeCycleRef.page.currentPage, this.lifeCycleRef.page.pageSize, condition).then(res => { |
| | | this.lifeCycleRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | done(); |
| | | this.lifeCycleRef.loading = false; |
| | | }, 600); |
| | | this.$nextTick(() => { |
| | | this.$refs.lifeCycleRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // 取消版本规则搜索 |
| | | clearSearchRevisionRule(item){ |
| | | clearSearchRevisionRule(item) { |
| | | this.revisionRuleOnLoad(); |
| | | }, |
| | | // 取消生命周期搜索 |
| | | clearSearchLifeCycle(item){ |
| | | clearSearchLifeCycle(item) { |
| | | this.lifeCycleOnLoad(); |
| | | console.log(item); |
| | | } |
| | |
| | | <el-header> |
| | | <div style="margin-bottom: 15px"> |
| | | 编码规则: |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" v-loading="selectLoading" |
| | | @change="selectHandler"> |
| | | <el-option v-for="(item,index) in queryReleasedList" |
| | | :key="item.oid" |
| | |
| | | tableData: [], |
| | | select: "", |
| | | selectValue: "", |
| | | editVisble: false |
| | | editVisble: false, |
| | | selectLoading:false, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | <el-header> |
| | | <div style="margin-bottom: 15px"> |
| | | 编码规则: |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" v-loading="selectLoading" |
| | | @change="selectHandler"> |
| | | <el-option v-for="(item,index) in queryReleasedList" |
| | | :key="item.oid" |
| | | :label="item.name" |
| | | :label="item.name + ' (' + item.id + ')'" |
| | | :value="item.oid"></el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | tableData: [], |
| | | select: "", |
| | | selectValue: "", |
| | | editVisble: false |
| | | editVisble: false, |
| | | selectLoading:false, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | created() { |
| | | this.getCodeRule(); |
| | | this.selectLoading = true; |
| | | }, |
| | | methods: { |
| | | editDialog(){ |
| | |
| | | const res2 = await getList({codeRuleId: this.select, chartType: "fillerChar", chartValue: this.characterValue}); |
| | | this.tableData = res2.data.data; |
| | | this.loading = false; |
| | | this.selectLoading = false; |
| | | } catch (error) { |
| | | this.$message.warning(error) |
| | | } |
| | |
| | | <el-header> |
| | | <div style="margin-bottom: 15px"> |
| | | 编码规则: |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" v-loading="selectLoading" |
| | | @change="selectHandler"> |
| | | <el-option v-for="(item,index) in queryReleasedList" |
| | | :key="item.oid" |
| | |
| | | tableData: [], |
| | | select: "", |
| | | selectValue: "", |
| | | editVisble: false |
| | | editVisble: false, |
| | | selectLoading:false, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | const res2 = await getList({codeRuleId: this.select, chartType: "prefix", chartValue: this.characterValue}); |
| | | this.tableData = res2.data.data; |
| | | this.loading = false; |
| | | this.selectLoading = false; |
| | | } catch (error) { |
| | | this.$message.warning(error) |
| | | } |
| | |
| | | <el-header> |
| | | <div style="margin-bottom: 15px"> |
| | | 编码规则: |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" |
| | | <el-select v-model="select" :filter-method="filterValue" filterable placeholder="请选择" size="small" v-loading="selectLoading" |
| | | @change="selectHandler"> |
| | | <el-option v-for="(item,index) in queryReleasedList" |
| | | :key="item.oid" |
| | | :label="item.name" |
| | | :label="item.name + ' (' + item.id + ')'" |
| | | :value="item.oid"></el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | tableData: [], |
| | | select: "", |
| | | selectValue: "", |
| | | editVisble: false |
| | | editVisble: false, |
| | | selectLoading:false, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | const res2 = await getList({codeRuleId: this.select, chartType: "charset", chartValue: this.characterValue}); |
| | | this.tableData = res2.data.data; |
| | | this.loading = false; |
| | | this.selectLoading = false; |
| | | } catch (error) { |
| | | this.$message.warning(error) |
| | | } |