Commit 3536dc38 by Thews

20231207汪皖苏

1 parent ce790594
...@@ -50,7 +50,33 @@ export function getJGYSGLAdd(params) { ...@@ -50,7 +50,33 @@ export function getJGYSGLAdd(params) {
export function getJGYSGLUpdate(params) { export function getJGYSGLUpdate(params) {
return post('/eleRel/updateEleRel', params); return post('/eleRel/updateEleRel', params);
} }
// 批量发布
export function getJGYSGLUpdateBatch(params) {
return post('/eleRel/updateEleRelBatch', params);
}
// 删除元素 // 删除元素
export function getJGYSGLDel(params) { export function getJGYSGLDel(params) {
return post('/eleRel/deleteEleRel', params); return post('/eleRel/deleteEleRel', params);
} }
// 架构视图配置
// 列表查询
export function getJGSTPZlist(params) {
return post('/vwDis/', params);
}
// 新建元素(state暂存2发布1)
export function getJGSTPZAdd(params) {
return post('/vwDis/addVwDis', params);
}
// 编辑元素(state暂存2发布1)
export function getJGSTPZUpdate(params) {
return post('/vwDis/updateVwDis', params);
}
// 批量发布
export function getJGSTPZUpdateBatch(params) {
return post('/vwDis/updateVwDisBatch', params);
}
// 删除元素
export function getJGSTPZDel(params) {
return post('/vwDis/deleteVwDis', params);
}
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">适用范围</span> <span class="search_title">适用范围</span>
<el-select v-model="params.scope" placeholder="请选择" class="search_item"> <el-select v-model="params.scope" placeholder="请选择" clearable class="search_item">
<el-option label="业务架构" value="业务架构"></el-option> <el-option label="业务架构" value="业务架构"></el-option>
<el-option label="应用架构" value="应用架构"></el-option> <el-option label="应用架构" value="应用架构"></el-option>
<el-option label="内容架构" value="内容架构"></el-option> <el-option label="内容架构" value="内容架构"></el-option>
...@@ -19,10 +19,8 @@ ...@@ -19,10 +19,8 @@
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">状态</span> <span class="search_title">状态</span>
<el-select v-model="params.state" placeholder="请选择" class="search_item"> <el-select v-model="params.state" placeholder="请选择" clearable class="search_item">
<el-option label="已发布" value=1></el-option> <el-option v-for="(item,idnex) in stateList" :key="idnex" :label="item.label" :value="item.value" ></el-option>
<el-option label="已停用" value=0></el-option>
<el-option label="暂存" value=2></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
...@@ -42,13 +40,13 @@ ...@@ -42,13 +40,13 @@
<img class="btn_icon" src="@/assets/新建icon.png" alt="" /> <img class="btn_icon" src="@/assets/新建icon.png" alt="" />
<p>新建</p> <p>新建</p>
</div> </div>
<div class="version_btn"> <div class="version_btn" @click="operate('pushAll')">
<img class="btn_icon" src="@/assets/版本发布icon.png" alt="" /> <img class="btn_icon" src="@/assets/版本发布icon.png" alt="" />
<p>版本发布</p> <p>版本发布</p>
</div> </div>
</div> </div>
<el-table :data="tableData" stripe border> <el-table :data="tableData" stripe border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
<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="rsName" label="元素关系名称" width="180" align="center"></el-table-column> <el-table-column prop="rsName" label="元素关系名称" width="180" align="center"></el-table-column>
<el-table-column prop="object1" label="对象1" width="180" align="center"></el-table-column> <el-table-column prop="object1" label="对象1" width="180" align="center"></el-table-column>
...@@ -136,17 +134,18 @@ import { ...@@ -136,17 +134,18 @@ import {
getJGYSGLAdd, getJGYSGLAdd,
getJGYSGLDel, getJGYSGLDel,
getJGYSGLUpdate, getJGYSGLUpdate,
getJGYSGLUpdateBatch,
} from "@/api/index.js"; } from "@/api/index.js";
export default { export default {
name: 'JiaGouYuanShuGuanXiGuanLi', name: 'archiEleRela',
components: { components: {
}, },
data() { data() {
return { return {
tableData: [ tableData: [],
], selectList: [],
add_dialog: false, add_dialog: false,
title: "", title: "",
openType: "", openType: "",
...@@ -181,6 +180,20 @@ export default { ...@@ -181,6 +180,20 @@ export default {
2: "暂存", 2: "暂存",
}, },
}, },
stateList: [
{
label: "已发布",
value: 1,
},
{
label: "已停用",
value: 0,
},
{
label: "暂存",
value: 2,
},
],
}; };
}, },
...@@ -194,6 +207,9 @@ export default { ...@@ -194,6 +207,9 @@ export default {
methods: { methods: {
// 查询列表 // 查询列表
getList() { getList() {
if (this.params.state != '') {
this.params.state = Number(this.params.state)
}
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;
...@@ -300,6 +316,26 @@ export default { ...@@ -300,6 +316,26 @@ export default {
} }
}); });
}); });
}else if (type == "pushAll") {
if (this.selectList.length <= 0) {
this.$message.error("请选择一项进行发布");
return;
}
let params = {
eleRelaId: [],
state: 1
};
this.selectList.map(item => {
params.eleRelaId.push(item.eleRelaId)
})
console.log(params);
getJGYSGLUpdateBatch(params).then(res => {
if (res.code == 200) {
this.$message.success("批量发布成功");
this.getList();
}
});
} }
}, },
// 新建清空表单 // 新建清空表单
...@@ -310,6 +346,17 @@ export default { ...@@ -310,6 +346,17 @@ export default {
} }
}, },
// 表格多选
handleSelectionChange(e) {
this.selectList = e;
},
selectInit(row,index){
if(row.state != "1"){
return true //可勾选
}else{
return false //不可勾选
}
},
}, },
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!