Commit 455a55a1 by liuyong

修改菜单

1 parent a880a6fa
......@@ -33,13 +33,13 @@ var exToolbar = function (toolbarContainer) {
if(res) {
$.ajax({
type: "post",
url: "http://192.168.161.129:7001/architecture/vi/file/upload",
// data: formData, //需要确认formData如何获取
processData: false,
contentType: false,
headers: {
'tkv': 'yMCwNqQ9yRQ37K3h2UVw56gwzWpzPxcs50w7nfsmyFGKuUp-LGB_M0sSgCzGqs8xMkXck0CMDupY_5T6My0bt2p4SEHsibGhMsdoNT55-2s-0bGUm_UIZliqXnCJwZJtOUavqh4OrAWgLBEV82RhEJbGuRY-pIrsGtM0jouSkhRyxpek91B0URTRFitm_A_-',
},
url: "http://192.168.161.129:7001/ynMol/updateYnMol",
data: JSON.stringify({
metaModelId: urlParams['id'],
version: urlParams['version'],
state: urlParams['state'],
}),
contentType: 'json',
success: function( result ) {
swal ( "版本发布" , "发布成功!" );
},
......
......@@ -3764,7 +3764,6 @@ App.prototype.showSplash = function(force)
this.showSplash();
}));
}else if (urlParams['id']) {//二次开发,初始化画面内容
console.log(urlParams);
$.ajax({
method: "post",
url: 'http://192.168.148.128:7003/ynMol/getByMetaModelId',
......
<template>
<iframe class="drawio_show" name="content_frame" :src="'/drawio/index.html?id='+ initGraphId_" frameborder=0 scrolling="no"></iframe>
<iframe
class="drawio_show"
name="content_frame"
:src="'/drawio/index.html?id='+id+'&version='+version+'&state='+state"
frameborder=0
scrolling="no">
</iframe>
</template>
<script>
export default {
props: {
initGraphId: String
initGraphId: Object
},
data() {
return {
initGraphId_: null
id: null,
version: null,
state: null,
};
},
watch: {
initGraphId: {
handler(newVal, oldVal) {
this.initGraphId_ = newVal;
this.id = newVal.id;
this.version = newVal.version;
this.state = newVal.state;
},
}
},
mounted(){
......
......@@ -486,17 +486,20 @@ export default {
query_jia_gou_yuan_su_guan_xi_table(params).then(result => {
if(result.code == 200) {
this.loading = false;
if(result.data.length > 0) {
this.pager.current = result.data.current;
this.pager.total = result.data.total;
this.pager.size = result.data.size;
if(result.data.records.length > 0) {
Promise.all([ this.get_dialog_select1(), this.get_dialog_select2() ]).then(res2 => {
this.dialog_select1 = res2[0];
this.search_select1 = res2[1];
result.data.map(item => {
result.data.records.map(item => {
let result1 = res2[0].find(item2 => item2.levelId == item.archiLevelId);
let result2 = res2[1].find(item2 => item2.belongId == item.archiBelongId);
item['archiLevelName'] = result1 ? result1.name : '';
item['archiBelongName'] = result2 ? result2.name : '';
});
this.tableData = result.data;
this.tableData = result.data.records;
})
}else {
this.tableData = [];
......
......@@ -18,7 +18,14 @@
};
},
mounted(){
this.routerId = window.location.href.split("=")[1];
const id = window.location.href.split("id=")[1].split("&")[0];
const version = window.location.href.split("id=")[1].split("&")[1].split("=")[1];
const state = window.location.href.split("id=")[1].split("&")[2].split("=")[1];
this.routerId = {
id,
version,
state
}
},
methods: {
......
......@@ -79,7 +79,7 @@
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
<img :src="imgS" alt="">
<!-- <img :src="imgS" alt=""> -->
</div>
</template>
......@@ -124,43 +124,54 @@ export default {
}
get_yuan_mo_xing_list(params).then(res => {
if(res.code == 200) {
this.yi_fa_bu = res.data.filter(item => item.state == 1);
this.zan_cun = res.data.filter(item => item.state == 2);
this.yi_fa_bu = res.data.records.filter(item => item.state == 1);
this.zan_cun = res.data.records.filter(item => item.state == 2);
}else {
}
})
},
deleteItem(item) {//删除
const params = {
metaModelId: item.metaModelId,
state: item.state
}
delete_yuan_mo_xing_list(params).then(res => {
if(res.code == 200) {
this.get_list();
Message({
type: 'success',
message: '删除成功!'
});
}else {
Message({
type: 'error',
message: '删除失败!'
});
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const params = {
metaModelId: item.metaModelId,
state: item.state
}
})
delete_yuan_mo_xing_list(params).then(res => {
if(res.code == 200) {
this.get_list();
Message({
type: 'success',
message: '删除成功!'
});
}else {
Message({
type: 'error',
message: '删除失败!'
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
},
get_list() {//查询列表
get_yuan_mo_xing_list({}).then(res => {
if(res.code == 200) {
this.yi_fa_bu = res.data.filter(item => item.state == 1);
this.zan_cun = res.data.filter(item => item.state == 2);
const res0 = res.data[0].metaModelData;
const blob = new Blob([res0], { type: 'application/xml' });
const imageUrl = (window.URL || window.webkitURL).createObjectURL(blob);
console.log(imageUrl)
this.imgS = imageUrl;
this.yi_fa_bu = res.data.records.filter(item => item.state == 1);
this.zan_cun = res.data.records.filter(item => item.state == 2);
// const res0 = res.data[0].records[0].metaModelData;
// const blob = new Blob([res0], { type: 'application/xml' });
// const imageUrl = (window.URL || window.webkitURL).createObjectURL(blob);
// console.log(imageUrl)
// this.imgS = imageUrl;
// Message({
// type: 'success',
// message: '版本发布成功!'
......@@ -183,7 +194,7 @@ export default {
// console.log(res)
if(res.code == 200) {
this.add_dialog = false;
this.$router.push(`/main/metaModelListDetails/id=${res.data}`, () => {}, () => {} );
this.$router.push(`/main/metaModelListDetails/?id=${res.data}`, () => {}, () => {} );
Message({
type: 'success',
message: '新增成功!'
......@@ -202,7 +213,8 @@ export default {
});
},
to_current_details(item) {//跳转到详情
this.$router.push( `/main/metaModelListDetails/id=${item.metaModelId}`, () => {}, () => {} );
console.log(item)
this.$router.push( `/main/metaModelListDetails/id=${item.metaModelId}&version=${item.version}&state=${item.state}`, () => {}, () => {} );
},
handleCommand(command) {//新建按钮点击
if(command == '自由绘图') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!