修改版本规则、元数据页面查看应用范围;修正页面点击编辑时,修改了源数据的问题;
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | var model = '/api/ubcs-omd'; |
| | | var controller = '/revision-rule'; |
| | | |
| | | |
| | | export const getPage = (current,size,params) => { |
| | | return request({ |
| | | url: '/api/ubcs-omd/revision-rule/page', |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getAppayRange = (id) => { |
| | | return request({ |
| | | url: model + controller + '/get-apply-range', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | ] |
| | | }, |
| | | data: [{ |
| | | tableName: '1', |
| | | description: '2' |
| | | }] |
| | | data: [], |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | businessEdit(){ |
| | | this.$refs.btmAdd.btmType = this.obj; |
| | | var json = JSON.stringify(this.obj); |
| | | this.$refs.btmAdd.btmType = JSON.parse(json); |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | |
| | | data() { |
| | | return { |
| | | addOption: { |
| | | linkType: {}, |
| | | linkType: { |
| | | attributes:[] |
| | | }, |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | |
| | | }, |
| | | // 添加按钮点击事件 |
| | | linkTypeAdd() { |
| | | this.$refs.linkAdd.linkType = {}; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // 编辑按钮点击事件 |
| | | linkTypeEdit() { |
| | | this.addOption.linkType = this.obj; |
| | | var linktype = this.obj; |
| | | linktype.fromBtmValues = this.obj.fromBtmTypes; |
| | | linktype.toBtmValues = this.obj.toBtmTypes; |
| | | linktype.attributes = this.obj.attributes; |
| | | var json = JSON.stringify(linktype); |
| | | this.addOption.linkType = JSON.parse(json); |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | console.log(this.obj); |
| | | }, |
| | | // 从已有中获取按钮点击事件 |
| | | selectFromTable() { |
| | |
| | | </el-form-item> |
| | | <el-form-item label="From端类型" label-width="100px"> |
| | | <!-- from端业务类型选择 --> |
| | | <el-select v-model="fromBtmValues" :value="fromBtmTypes" value-key="oid" placeholder="请选择From端类型" filterable multiple collapse-tags @change="fromSelectChange"> |
| | | <el-select v-model="linkType.fromBtmValues" :value="linkType.fromBtmTypes" value-key="oid" placeholder="请选择From端类型" filterable multiple collapse-tags @change="fromSelectChange"> |
| | | <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name"> |
| | | <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name" |
| | | :value="item"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="To端类型" label-width="100px"> |
| | | <!-- to端业务类型选择 --> |
| | | <el-select v-model="toBtmValues" :value="toBtmTypes" value-key="oid" placeholder="请选择To端类型" filterable multiple collapse-tags @change="toSelectChange"> |
| | | <el-select v-model="linkType.toBtmValues" :value="linkType.toBtmTypes" value-key="oid" placeholder="请选择To端类型" filterable multiple collapse-tags @change="toSelectChange"> |
| | | <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name"> |
| | | <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name" |
| | | :value="item"> |
| | |
| | | row.$cellEdit = false; |
| | | }, |
| | | fromSelectChange(dataList){ |
| | | console.log(dataList); |
| | | this.linkType.fromBtmTypes = []; |
| | | var fromBtmName = ""; |
| | | var fromBtmType = ""; |
| | |
| | | }) |
| | | this.linkType.fromBtmTypeName = fromBtmName; |
| | | this.linkType.fromBtmType = fromBtmType; |
| | | console.log(this.linkType); |
| | | }, |
| | | toSelectChange(dataList){ |
| | | console.log(dataList); |
| | |
| | | @row-del="rowDel" |
| | | @refresh-change="refreshChange" |
| | | @search-reset="searchChange" |
| | | @search-change="searchChange"> |
| | | @search-change="searchChange" |
| | | @row-click="rowClick"> |
| | | <template slot="menuLeft"> |
| | | <el-tooltip class="item" effect="dark" content="查找版本规则使用范围" placement="top"> |
| | | <el-button size="small" |
| | | plain |
| | | type="primary" |
| | | icon="el-icon-zoom-in" |
| | | @click="handleSearch">查看使用范围 |
| | | @click="applyRangeSearch">查看使用范围 |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template>> |
| | | </template> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="selectRow" |
| | | :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="查看使用范围" |
| | | append-to-body |
| | | :visible.sync="packageSearchBox" |
| | | width="1200px"> |
| | | <versionpackage></versionpackage> |
| | | </el-dialog> |
| | | <versionpackage :rangeData="applyRangeData" ref="applyRange"></versionpackage> |
| | | </basic-container> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPage,add,update,remove } from '../../api/omd/revisionRule'; |
| | | import { getPage,add,update,remove,getAppayRange } from '../../api/omd/revisionRule'; |
| | | export default { |
| | | name: "Version", |
| | | data(){ |
| | | return { |
| | | //查看使用范围 |
| | | packageSearchBox:false, |
| | | // 点击数据 |
| | | selectRow: '', |
| | | selectRowData: {}, |
| | | //分页数据 |
| | | page: { |
| | | pageSize: 10, |
| | |
| | | border: true, |
| | | index: true, |
| | | searchMenuSpan:5, |
| | | highlightCurrentRow: true, |
| | | stripe:true, |
| | | column:[ |
| | | { |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 120 |
| | | }, |
| | | { |
| | | label:'英文名称', |
| | | prop: 'id' |
| | |
| | | type:"textarea" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | applyRangeData: [] |
| | | } |
| | | }, |
| | | methods:{ |
| | | handleSearch(){ |
| | | this.packageSearchBox=true |
| | | // 行点击 |
| | | rowClick(row){ |
| | | this.selectRow = row.$index; |
| | | this.selectRowData = row; |
| | | }, |
| | | // 查看应用范围 |
| | | applyRangeSearch(){ |
| | | if (!this.selectRow && this.selectRow != 0){ |
| | | console.log(this.selectRow); |
| | | this.$message({ |
| | | type:"warning", |
| | | message: "请先选择属性" |
| | | }) |
| | | } |
| | | getAppayRange(this.selectRowData.id).then(res => { |
| | | this.applyRangeData = res.data.data; |
| | | this.$refs.applyRange.rangeData = this.applyRangeData; |
| | | this.$refs.applyRange.showDialog = true; |
| | | }) |
| | | // this.packageSearchBox=true |
| | | }, |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | <template> |
| | | <el-dialog title="查看应用范围" :visible.sync="showDialog" append-to-body @close="closeDialog" width="65%" |
| | | style="height: 115vh;"> |
| | | <basic-container> |
| | | <avue-crud ref="crud" |
| | | v-model="form" |
| | | :data="data" |
| | | :option="option" |
| | | @on-load="getList" |
| | | @refresh-change="refreshChange" |
| | | @search-change="searchChange" |
| | | > |
| | | <avue-crud ref="crud" :data="rangeData" :option="option"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "Versionpackage.vue", |
| | | props: { |
| | | rangeData: { |
| | | type: Array |
| | | }, |
| | | |
| | | }, |
| | | data(){ |
| | | return { |
| | | |
| | | data:[ |
| | | { |
| | | name:"测试1", |
| | | source:"测试1", |
| | | shows:"测试1" |
| | | }, |
| | | { |
| | | name:"测试2", |
| | | source:"测试2", |
| | | shows:"测试2" |
| | | }, |
| | | { |
| | | name:"测试3", |
| | | source:"测试3", |
| | | shows:"测试3" |
| | | }, |
| | | { |
| | | name:"测试4", |
| | | source:"测试4", |
| | | shows:"测试4" |
| | | }, |
| | | ], |
| | | form:{}, |
| | | showDialog: false, |
| | | option:{ |
| | | height:300, |
| | | headerAlign:'center', |
| | |
| | | border: true, |
| | | menu: false, |
| | | index: true, |
| | | searchMenuSpan:6, |
| | | addBtn:false, |
| | | indexFixed:false, |
| | | menuFixed:false, |
| | | column:[ |
| | | { |
| | | label:"名称", |
| | | prop:"name", |
| | | header: false, |
| | | highlightCurrentRow: true, |
| | | column: [{ |
| | | label: '英文名称', |
| | | prop: 'id' |
| | | }, |
| | | { |
| | | label:"来源", |
| | | prop:"source", |
| | | search:true |
| | | label: '中文名称', |
| | | prop: 'name', |
| | | }, |
| | | { |
| | | label:"说明", |
| | | prop:"shows", |
| | | label: '所属领域', |
| | | prop: 'domainText', |
| | | },{ |
| | | label: '数据表名', |
| | | prop: 'tableName', |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: '说明', |
| | | prop: 'descirption', |
| | | }, |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | // getList () { |
| | | // this.loading = true; |
| | | // const data = Object.assign({ |
| | | // pageNum: this.page.currentPage, |
| | | // pageSize: this.page.pageSize, |
| | | // }, this.params) |
| | | // this.data = []; |
| | | // getList(data).then(res => { |
| | | // const data = res.data.data |
| | | // this.loading = false; |
| | | // this.page.total = data.total; |
| | | // const result = data.list; |
| | | // this.data = result; |
| | | // }) |
| | | // }, |
| | | //搜索 |
| | | searchChange(params, done) { |
| | | if (done) done(); |
| | | this.params = params; |
| | | this.page.currentPage = 1; |
| | | this.getList(); |
| | | this.$message.success('搜索成功') |
| | | closeDialog() { |
| | | this.rangeData = []; |
| | | this.showDialog = false; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud v-model="form" |
| | | ref="crud" |
| | | :option="option" |
| | | :data="data" |
| | | @on-load="onLoad" |
| | | :page.sync="page" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick"> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="selectRow" |
| | | :label="row.$index"> |
| | | <avue-crud v-model="form" ref="crud" :option="option" :data="data" @on-load="onLoad" :page.sync="page" |
| | | @refresh-change="refreshChange" @row-click="rowClick"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="selectRow" :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | <template slot="menu"> |
| | |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">删除</el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="addSave">新 增 |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">新 增 |
| | | </el-button> |
| | | <el-button size="small" |
| | | plain |
| | | type="primary" |
| | | icon="el-icon-zoom-in" |
| | | @click="applyRangeOpen">查看使用范围 |
| | | <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">查看使用范围 |
| | | </el-button> |
| | | </template> |
| | | <template slot="typeValue" slot-scope="{row}"> |
| | | <el-tag>{{ row.typeValue }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog :visible.sync="applyRange.display" append-to-body :title="applyRange.title" width="600px" |
| | | <!-- <el-dialog :visible.sync="applyRange.display" append-to-body :title="applyRange.title" width="600px" |
| | | @close="applyRangeClose"> |
| | | <avue-crud v-model="applyRange.model" :option="applyRange.option" :data="applyRange.data" class="applyRangeTable" |
| | | ></avue-crud> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <Versionpackage :rangeData="applyRangeData" ref="applyRange"></Versionpackage> |
| | | </basic-container> |
| | | </el-main> |
| | | <el-aside> |
| | |
| | | add, |
| | | update, getPage, getApplyRange |
| | | } from "@/api/omd/OmdAttribute"; |
| | | import Versionpackage from "./Versionpackage.vue"; |
| | | |
| | | export default { |
| | | name: "original", |
| | |
| | | currentPage: 1, |
| | | total: 100 |
| | | }, |
| | | selectRow: '', |
| | | selectRow: "", |
| | | data: [], |
| | | form:{}, |
| | | attribute: { |
| | | nullable: true |
| | | }, |
| | | applyRangeData: [], |
| | | option: { |
| | | height: "550px", |
| | | headerAlign: 'center', |
| | | headerAlign: "center", |
| | | border: true, |
| | | index: true, |
| | | rowKey: 'id', |
| | | rowKey: "id", |
| | | tabs: true, |
| | | stripe:true, |
| | | indexFixed: false, |
| | |
| | | editBtn:false, |
| | | delBtn:false, |
| | | column: [{ |
| | | label: '选择', |
| | | prop: 'radio', |
| | | label: "选择", |
| | | prop: "radio", |
| | | width: 60, |
| | | hide: false, |
| | | display: false |
| | | }, |
| | | { |
| | | label: '属性编号', |
| | | prop: 'id', |
| | | align: 'left', |
| | | }, { |
| | | label: "属性编号", |
| | | prop: "id", |
| | | align: "left", |
| | | display: false, |
| | | width: 200, |
| | | required: true |
| | | }, { |
| | | label: '属性名称', |
| | | prop: 'name', |
| | | align: 'left', |
| | | label: "属性名称", |
| | | prop: "name", |
| | | align: "left", |
| | | display: false |
| | | }, |
| | | { |
| | | label: '标签', |
| | | prop: 'hashtag', |
| | | }, { |
| | | label: "标签", |
| | | prop: "hashtag", |
| | | // hide: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: '是否使用枚举', |
| | | prop: 'usingDict', |
| | | type: 'switch', |
| | | }, { |
| | | label: "是否使用枚举", |
| | | prop: "usingDict", |
| | | type: "switch", |
| | | hide: true, |
| | | labelWidth: 132, |
| | | display: false, |
| | | dicData: [{ |
| | | label: '是', |
| | | value: 'true' |
| | | label: "是", |
| | | value: "true" |
| | | }, { |
| | | label: '否', |
| | | value: 'false' |
| | | label: "否", |
| | | value: "false" |
| | | }] |
| | | }, |
| | | { |
| | | label: '属性类型', |
| | | prop: 'typeValue', |
| | | }, { |
| | | label: "属性类型", |
| | | prop: "typeValue", |
| | | display: false, |
| | | // hide: true |
| | | }, |
| | | { |
| | | label: '默认值', |
| | | prop: 'defaultValue', |
| | | }, { |
| | | label: "默认值", |
| | | prop: "defaultValue", |
| | | display: false |
| | | }, |
| | | { |
| | | label: '允许为空', |
| | | prop: 'nullable', |
| | | type: 'switch', |
| | | }, { |
| | | label: "允许为空", |
| | | prop: "nullable", |
| | | type: "switch", |
| | | display: false, |
| | | hide: true, |
| | | labelWidth: 132, |
| | | dicData: [{ |
| | | label: '否', |
| | | value: 'false' |
| | | label: "否", |
| | | value: "false" |
| | | }, { |
| | | label: '是', |
| | | value: 'true' |
| | | label: "是", |
| | | value: "true" |
| | | }] |
| | | }, |
| | | { |
| | | }, { |
| | | label: "长度", |
| | | prop: "maxLength", |
| | | hide: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: '描述', |
| | | prop: 'description', |
| | | }, { |
| | | label: "描述", |
| | | prop: "description", |
| | | type: "textarea", |
| | | display: false |
| | | }, |
| | | ] |
| | | }, |
| | | applyRange: { |
| | | model: "", |
| | | title: "应用的业务类型", |
| | | option: { |
| | | height: 360, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | menu: false, |
| | | border: true, |
| | | reserveSelection: true, |
| | | searchMenuSpan:8, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: '业务类型编号', |
| | | prop: 'id', |
| | | align: 'left', |
| | | }, |
| | | { |
| | | label: '业务类型名称', |
| | | prop: 'name', |
| | | align: 'left', |
| | | }, |
| | | ] |
| | | }, |
| | | data: [], |
| | | display: false, |
| | | }, |
| | | itemForm:{ |
| | | itemData: {}, |
| | | activeName: 'referTab', |
| | | activeName: "referTab", |
| | | form:{} |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | refreshChange() { |
| | |
| | | deleteSave(){ |
| | | remove(this.itemForm.itemData).then(res => { |
| | | this.$message.success("删除成功"); |
| | | }) |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.data = res.data.data.records |
| | | this.data = res.data.data.records; |
| | | this.itemData = this.data[0]; |
| | | }) |
| | | }); |
| | | }, |
| | | rowClick(row) { |
| | | this.itemForm.itemData = row; |
| | | this.selectRow = row.$index; |
| | | this.attribute = row; |
| | | } |
| | | ,selectBtmType(){ |
| | | }, |
| | | selectBtmType() { |
| | | this.referType.display = true; |
| | | this.referType.title = "请选择" + this.referType.value |
| | | this.referType.title = "请选择" + this.referType.value; |
| | | }, |
| | | applyRangeOpen(){ |
| | | if (!this.selectRow){ |
| | | if (!this.selectRow && this.selectRow != 0) { |
| | | this.$message({ |
| | | type:"warning", |
| | | message: "请先选择属性" |
| | | }) |
| | | }); |
| | | } |
| | | var oid = this.data[this.selectRow].oid; |
| | | getApplyRange(oid).then(res => { |
| | | this.applyRange.data = res.data.data; |
| | | }) |
| | | this.applyRange.display = true; |
| | | this.applyRangeData = res.data.data; |
| | | this.$refs.applyRange.rangeData = this.applyRangeData; |
| | | this.$refs.applyRange.showDialog = true; |
| | | |
| | | }); |
| | | }, |
| | | applyRangeClose(){ |
| | | this.applyRange.data = []; |
| | | this.applyRange.display = false; |
| | | } |
| | | }, |
| | | components: { Versionpackage } |
| | | } |
| | | </script> |
| | | |
| | |
| | | search: true |
| | | }, |
| | | { |
| | | label:"中文名称", |
| | | prop:"name", |
| | | label:'中文名称', |
| | | prop:'name', |
| | | search:true, |
| | | }, |
| | | { |
| | | label: "描述", |
| | | prop:"description", |
| | | type:"textarea" |
| | | label: '描述', |
| | | prop:'description', |
| | | type:'textarea' |
| | | } |
| | | ] |
| | | } |
| | |
| | | }, |
| | | methods:{ |
| | | handleSearch(){ |
| | | this.packageSearchBox=true |
| | | // this.packageSearchBox=true |
| | | }, |
| | | getList() { |
| | | this.loading = true; |