Commit 455a55a1 by liuyong

修改菜单

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