Commit d533039a by liuyong
2 parents 379ee7f3 aefd62aa
This diff could not be displayed because it is too large.
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
"@vue/cli-plugin-router": "~5.0.0", "@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0", "@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.0",
"node-sass": "^4.14.1", "node-sass": "^6.0.1",
"sass-loader": "^7.3.1", "sass-loader": "^10.0.1",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"
}, },
"browserslist": [ "browserslist": [
......
...@@ -29,17 +29,18 @@ var exToolbar = function (toolbarContainer) { ...@@ -29,17 +29,18 @@ var exToolbar = function (toolbarContainer) {
// Toggles compact mode // Toggles compact mode
mxEvent.addListener(this.toggleElement, 'click', mxUtils.bind(this, function (evt) { mxEvent.addListener(this.toggleElement, 'click', mxUtils.bind(this, function (evt) {
swal({ title: "", text: '该操作将发布架构设计新版本,请确认是否继续?',confirmButtonColor:'rgb(13,134,127)',icon: "warning", buttons: ["取消", "发布"] }).then(res => { swal({ title: "版本发布确认", text: '该操作将发布架构设计新版本,请确认是否继续?',confirmButtonColor:'rgb(13,134,127)',icon: "warning", buttons: ["取消", "发布"] }).then(res => {
if(res) { if(res) {
var jsonData = {
"metaModelId": urlParams['id'],
"version": urlParams['version'],
"state": 1
}
$.ajax({ $.ajax({
method: "post", method: "post",
url: "http://43.143.211.42:7003/ynMol/updateYnMol", url: "http://43.143.211.42:7003/ynMol/updateYnMol",
data: { contentType : 'application/json',
metaModelId: urlParams['id'], data: JSON.stringify(jsonData),
version: urlParams['version'],
state: urlParams['state'],
},
// contentType: 'application/json',
success: function( result ) { success: function( result ) {
swal ( "版本发布" , "发布成功!" ); swal ( "版本发布" , "发布成功!" );
}, },
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
var loadDiagram = function (id, diagramTitle) { var loadDiagram = function (id, diagramTitle) {
var requestUrl = id == 1 ? '/drawio/extention/xml/meta-model.xml':'/drawio/extention/xml/architecture-assets.xml'; var requestUrl = id == 1 ? '/drawio/extention/xml/meta-model.xml':'/drawio/extention/xml/architecture-assets.xml';
if(id == 3) {
requestUrl = '/drawio/extention/xml/meta-model-data.xml';
}
var resultData = {}; var resultData = {};
$.ajax({ $.ajax({
type: "get", type: "get",
......
...@@ -486,8 +486,8 @@ App.getStoredMode = function() ...@@ -486,8 +486,8 @@ App.getStoredMode = function()
window.location.hash == '') || (window.location.hash != null && window.location.hash == '') || (window.location.hash != null &&
window.location.hash.substring(0, 2) == '#G')) window.location.hash.substring(0, 2) == '#G'))
{ {
// mxscript('https://apis.google.com/js/api.js'); //二次开发 删除apis.google.com的加载过程,改为加载本地文件 mxscript('https://apis.google.com/js/api.js'); //二次开发 删除apis.google.com的加载过程,改为加载本地文件
mxscript('js/api.js'); // mxscript('js/api.js');
} }
// Keeps lazy loading for fallback to authenticated Google file if not public in loadFile // Keeps lazy loading for fallback to authenticated Google file if not public in loadFile
else if (urlParams['chrome'] == '0' && (window.location.hash == null || else if (urlParams['chrome'] == '0' && (window.location.hash == null ||
...@@ -884,8 +884,8 @@ App.main = function(callback, createUi) ...@@ -884,8 +884,8 @@ App.main = function(callback, createUi)
(urlParams['embed'] == '1' && urlParams['gapi'] == '1')) && isSvgBrowser && (urlParams['embed'] == '1' && urlParams['gapi'] == '1')) && isSvgBrowser &&
isLocalStorage && (document.documentMode == null || document.documentMode >= 10)))) isLocalStorage && (document.documentMode == null || document.documentMode >= 10))))
{ {
// mxscript('https://apis.google.com/js/api.js?onload=DrawGapiClientCallback', null, null, null, mxClient.IS_SVG); mxscript('https://apis.google.com/js/api.js?onload=DrawGapiClientCallback', null, null, null, mxClient.IS_SVG);
mxscript('js/api.js', null, null, null, mxClient.IS_SVG);//二次开发,下载翻墙插件到本地 // mxscript('js/api.js', null, null, null, mxClient.IS_SVG);//二次开发,下载翻墙插件到本地
} }
// Disables client // Disables client
else if (typeof window.gapi === 'undefined') else if (typeof window.gapi === 'undefined')
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button> <el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button> <el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('push',scope.row)" :disabled="scope.row.state == 1">发布</el-button> <el-button icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> <el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
<!-- <div class="add_btn" @click="operate('edit',scope.row)" style="border: 0;margin-right: 8px;"> <!-- <div class="add_btn" @click="operate('edit',scope.row)" style="border: 0;margin-right: 8px;">
<img class="btn_icon" src="@/assets/编辑_icon_default.png" alt="" /> <img class="btn_icon" src="@/assets/编辑_icon_default.png" alt="" />
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="operate('push')">发布</el-button> <el-button class="greenButton" @click="operate('pushAdd')">发布</el-button>
<el-button class="greenButton" @click="operate('create')">保存</el-button> <el-button class="greenButton" @click="operate('create')">保存</el-button>
<el-button @click="add_dialog = false">取消</el-button> <el-button @click="add_dialog = false">取消</el-button>
</span> </span>
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0, //总条数
}, },
dicObj: { dicObj: {
state: { state: {
...@@ -212,9 +212,8 @@ export default { ...@@ -212,9 +212,8 @@ export default {
} }
getJGYSGLlist(this.params).then(res => { getJGYSGLlist(this.params).then(res => {
if (res.code == 200) { if (res.code == 200) {
// this.page.total = res.data.total; this.page.total = res.data.total;
// this.tableData = res.data.records; this.tableData = res.data.records;
this.tableData = res.data;
} }
}); });
}, },
...@@ -271,7 +270,7 @@ export default { ...@@ -271,7 +270,7 @@ export default {
} }
}); });
} }
}else if (type == "push") { }else if (type == "pushAdd") {
this.formData.state = 1; this.formData.state = 1;
if (this.formData.eleRelaId) { if (this.formData.eleRelaId) {
// 编辑发布 // 编辑发布
...@@ -292,6 +291,17 @@ export default { ...@@ -292,6 +291,17 @@ export default {
} }
}); });
} }
}else if (type == "pushEdit") {
// 编辑发布
this.formData = item
this.formData.state = 1;
getJGYSGLUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}
});
}else if (type == "stop") { }else if (type == "stop") {
// 停用 // 停用
this.formData = item; this.formData = item;
...@@ -312,6 +322,7 @@ export default { ...@@ -312,6 +322,7 @@ export default {
}).then(() => { }).then(() => {
getJGYSGLDel(this.formData).then(res => { getJGYSGLDel(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("删除成功");
this.getList(); this.getList();
} }
}); });
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button> <el-button icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button> <el-button icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button icon="el-icon-upload2" size="mini" @click="operate('push',scope.row)" :disabled="scope.row.state == 1">发布</el-button> <el-button icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> <el-button icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
</div> </div>
</template> </template>
...@@ -109,8 +109,7 @@ ...@@ -109,8 +109,7 @@
</el-select> </el-select>
</div> </div>
<div class="dialog_form_item"> <div class="dialog_form_item">
<div class="dialog_form_item_title"><span class="reqIcon">*</span>架构视图名称:</div> <div class="dialog_form_item_title"><span class="reqIcon">*</span>架构视图名称</div>
<!-- <el-input placeholder="" class="dialog_form_item_content" v-model="formData.viewName"></el-input> -->
<el-select v-model="formData.viewName" placeholder="请选择" clearable class="search_item"> <el-select v-model="formData.viewName" placeholder="请选择" clearable class="search_item">
<el-option v-for="(item,idnex) in viewNameList" :key="idnex" :label="item" :value="item" ></el-option> <el-option v-for="(item,idnex) in viewNameList" :key="idnex" :label="item" :value="item" ></el-option>
</el-select> </el-select>
...@@ -120,7 +119,7 @@ ...@@ -120,7 +119,7 @@
<div class="dialog_form_item_title"><span class="reqIcon">*</span>视图描述</div> <div class="dialog_form_item_title"><span class="reqIcon">*</span>视图描述</div>
<el-input type="textarea" :rows="2" placeholder="请输入内容" class="dialog_form_item_content" v-model="formData.content"></el-input> <el-input type="textarea" :rows="2" placeholder="请输入内容" class="dialog_form_item_content" v-model="formData.content"></el-input>
</div> </div>
<!-- <div class="dialog_form_item"> <div class="dialog_form_item">
<div class="dialog_form_item_title">*元素范围</div> <div class="dialog_form_item_title">*元素范围</div>
<el-table :data="tableData2" border> <el-table :data="tableData2" border>
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
...@@ -135,10 +134,10 @@ ...@@ -135,10 +134,10 @@
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column> <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="name" label="元素名称" align="center"></el-table-column> <el-table-column prop="name" label="元素名称" align="center"></el-table-column>
</el-table> </el-table>
</div> --> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="operate('push')">发布</el-button> <el-button class="greenButton" @click="operate('pushAdd')">发布</el-button>
<el-button class="greenButton" @click="operate('create')">保存</el-button> <el-button class="greenButton" @click="operate('create')">保存</el-button>
<el-button @click="add_dialog = false">取消</el-button> <el-button @click="add_dialog = false">取消</el-button>
</span> </span>
...@@ -203,7 +202,7 @@ export default { ...@@ -203,7 +202,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0, //总条数
}, },
dicObj: { dicObj: {
state: { state: {
...@@ -295,14 +294,10 @@ export default { ...@@ -295,14 +294,10 @@ export default {
methods: { methods: {
// 查询列表 // 查询列表
getList() { getList() {
// if (this.params.state != '') {
// this.params.state = Number(this.params.state)
// }
getJGSTPZlist(this.params).then(res => { getJGSTPZlist(this.params).then(res => {
if (res.code == 200) { if (res.code == 200) {
// this.page.total = res.data.total; this.page.total = res.data.total;
// this.tableData = res.data.records; this.tableData = res.data.records;
this.tableData = res.data;
} }
}); });
}, },
...@@ -310,7 +305,6 @@ export default { ...@@ -310,7 +305,6 @@ export default {
getViewNameList() { getViewNameList() {
getViewNameList().then(res => { getViewNameList().then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log(res);
let arr = JSON.parse(res.msg); let arr = JSON.parse(res.msg);
let viewStr = arr[0].viewName; let viewStr = arr[0].viewName;
this.viewNameList = viewStr.split(","); this.viewNameList = viewStr.split(",");
...@@ -371,7 +365,7 @@ export default { ...@@ -371,7 +365,7 @@ export default {
} }
}); });
} }
}else if (type == "push") { }else if (type == "pushAdd") {
this.formData.state = 1; this.formData.state = 1;
if (this.formData.viewId) { if (this.formData.viewId) {
// 编辑发布 // 编辑发布
...@@ -392,6 +386,17 @@ export default { ...@@ -392,6 +386,17 @@ export default {
} }
}); });
} }
}else if (type == "pushEdit") {
// 编辑发布
this.formData = item
this.formData.state = 1;
getJGSTPZUpdate(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("发布成功");
this.add_dialog = false;
this.getList();
}
});
}else if (type == "stop") { }else if (type == "stop") {
// 停用 // 停用
this.formData = item; this.formData = item;
...@@ -412,6 +417,7 @@ export default { ...@@ -412,6 +417,7 @@ export default {
}).then(() => { }).then(() => {
getJGSTPZDel(this.formData).then(res => { getJGSTPZDel(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("删除成功");
this.getList(); this.getList();
} }
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!