提交 2ebe5496 authored 作者: thy's avatar thy

规则页面修改功能修复

上级 df2b2e67
...@@ -198,12 +198,12 @@ ...@@ -198,12 +198,12 @@
</el-form> </el-form>
</div> </div>
<!-- <div class="line"></div> --> <!-- <div class="line"></div> -->
<div :class="{'pg-button no':!isLog,'pg-button':isLog}" @click="goPrev">上次报告</div> <div :class="{'pg-button no':!isLog,'pg-button':isLog}" @click="goPrev">对应评估报告</div>
<div <div
:class="{'pg-button':form.cost!=''&& form.projectName!='' ,'pg-button no':form.cost==''|| form.projectName=='' }" :class="{'pg-button':form.cost!=''&& form.projectName!='' ,'pg-button no':form.cost==''|| form.projectName=='' }"
@click="goPg2(1)" @click="goPg2(1)"
>快速评估</div> >保存并快速评估</div>
<div class="pg-button" @click="goBack">关闭</div> <div class="pg-button" @click="goBack">关闭</div>
</div> </div>
</div> </div>
...@@ -1246,7 +1246,7 @@ ...@@ -1246,7 +1246,7 @@
</div> </div>
<div class="pg-button-box" > <div class="pg-button-box" >
<div class="pg-button ball" @click="backTop">回到顶部</div> <div class="pg-button ball" @click="backTop">回到顶部</div>
<div v-show="isOpen" :class="{'pg-button no active':form.cost!=''&& form.projectName!='' && (systemStructure.application.deploy != '' || systemStructure.application.operateSystem != '' || systemStructure.application.other != '' || systemStructure.application.edition != '' || systemStructure.database.other != '' || systemStructure.database.deploy != '' || systemStructure.database.operateSystem != '' || systemStructure.database.edition != '' || systemStructure.storage.edition != '' || systemStructure.storage.other != '' || systemStructure.storage.deploy != '' || systemStructure.storage.operateSystem != '' || systemStructure.otherEquipment.operateSystem != '' || systemStructure.otherEquipment.edition != '' || systemStructure.otherEquipment.deploy != '' || systemStructure.otherEquipment.other != '' || systemStructure.slb.operateSystem != '' || systemStructure.slb.edition != '' || systemStructure.slb.deploy != '' || systemStructure.slb.other != '' || systemStructure.otherDemand != '' || systemStructure.loadBalance != '' || systemStructure.disaster != '' || systemStructure.distributed != '' || browser.plugInUnit != '' || browser.compatibleBrowsers != '' || browser.otherBrowser!='' || browser.geography != '' || browser.peripheral != '' || browser.media != '' || browser.animation!= '' || browser.document != '' || browser.threeD != '' || browser.flash != '' || browser.otherDemand != '' || middleware.middlewareEnums != '' || middleware.otherMiddleware != '' || middleware.web!='' || middleware.jndi != '' || middleware.jms != '' || middleware.route != '' || database.databaseType != '' || database.othertype != '' || database.view !='' || database.storage != '' || database.function != '' || database.dbLink != '' || database.sequence != '' || database.timeTask != '' || database.trigger != '' || database.disasterTolerance != ''|| database.separate != '' || database.safe != '' || database.performance != ''|| database.otherContent != '' || strategy != '' || apply.reason != '' || apply.cost != '') ,'pg-button no':true}" @click="goPg2(2)">详细评估</div> <div v-show="isOpen" :class="{'pg-button no active':form.cost!=''&& form.projectName!='' && (systemStructure.application.deploy != '' || systemStructure.application.operateSystem != '' || systemStructure.application.other != '' || systemStructure.application.edition != '' || systemStructure.database.other != '' || systemStructure.database.deploy != '' || systemStructure.database.operateSystem != '' || systemStructure.database.edition != '' || systemStructure.storage.edition != '' || systemStructure.storage.other != '' || systemStructure.storage.deploy != '' || systemStructure.storage.operateSystem != '' || systemStructure.otherEquipment.operateSystem != '' || systemStructure.otherEquipment.edition != '' || systemStructure.otherEquipment.deploy != '' || systemStructure.otherEquipment.other != '' || systemStructure.slb.operateSystem != '' || systemStructure.slb.edition != '' || systemStructure.slb.deploy != '' || systemStructure.slb.other != '' || systemStructure.otherDemand != '' || systemStructure.loadBalance != '' || systemStructure.disaster != '' || systemStructure.distributed != '' || browser.plugInUnit != '' || browser.compatibleBrowsers != '' || browser.otherBrowser!='' || browser.geography != '' || browser.peripheral != '' || browser.media != '' || browser.animation!= '' || browser.document != '' || browser.threeD != '' || browser.flash != '' || browser.otherDemand != '' || middleware.middlewareEnums != '' || middleware.otherMiddleware != '' || middleware.web!='' || middleware.jndi != '' || middleware.jms != '' || middleware.route != '' || database.databaseType != '' || database.othertype != '' || database.view !='' || database.storage != '' || database.function != '' || database.dbLink != '' || database.sequence != '' || database.timeTask != '' || database.trigger != '' || database.disasterTolerance != ''|| database.separate != '' || database.safe != '' || database.performance != ''|| database.otherContent != '' || strategy != '' || apply.reason != '' || apply.cost != '') ,'pg-button no':true}" @click="goPg2(2)">保存并详细评估</div>
</div> </div>
</div> </div>
...@@ -1556,6 +1556,7 @@ export default { ...@@ -1556,6 +1556,7 @@ export default {
this.$server.goPg(obj).then(res => { this.$server.goPg(obj).then(res => {
console.log(res); console.log(res);
this.$store.commit('changeRoutePg', 1);
this.$message({ this.$message({
message: "生成评估报告成功", message: "生成评估报告成功",
type: "success" type: "success"
......
...@@ -86,6 +86,16 @@ export default { ...@@ -86,6 +86,16 @@ export default {
methods: { methods: {
add(){ add(){
console.log(this.$store.state.userData.userName) console.log(this.$store.state.userData.userName)
// let Logistics= this.$router.resolve({
// path:'/assessmentReport',
// query:{
// username:this.$store.state.userData.userName,
// authority: this.$store.state.userData.type,
// id: null,
// }
// })
// window.open(Logistics.href)
this.$router.push({ this.$router.push({
name: "assessmentReport", name: "assessmentReport",
query: { query: {
...@@ -135,8 +145,16 @@ export default { ...@@ -135,8 +145,16 @@ export default {
evaluation(row) { evaluation(row) {
console.log(row) console.log(row)
console.log(this.$store.state.userData) console.log(this.$store.state.userData)
// return // // return
// let Logistics= this.$router.resolve({
// path:'/assessmentReport',
// query:{
// username:row.username,
// authority: this.$store.state.userData.type,
// id: row.id,
// }
// })
// window.open(Logistics.href)
this.$router.push({name:'assessmentReport', query: { this.$router.push({name:'assessmentReport', query: {
username: row.username, username: row.username,
id: row.id, id: row.id,
...@@ -146,7 +164,16 @@ export default { ...@@ -146,7 +164,16 @@ export default {
}, },
// 报告 // 报告
report(row) { report(row) {
console.log(row) // console.log(row)
// let Logistics= this.$router.resolve({
// path:'/reportAssess',
// query:{
// username:row.username,
// authority: this.$store.state.userData.type,
// id: row.id,
// }
// })
// window.open(Logistics.href)
this.$router.push({name:'reportAssess',query: { this.$router.push({name:'reportAssess',query: {
username: row.username, username: row.username,
id:row.id, id:row.id,
...@@ -197,7 +224,16 @@ export default { ...@@ -197,7 +224,16 @@ export default {
}, },
components: { components: {
}, },
computed: {
listData() {
return this.$store.state.routeClick;
}
},
watch: { watch: {
'$store.state.routeClick':function(newFlag, oldFlag){
// 需要执行的代码
console.log('vuex==========',newFlag,oldFlag)
}
} }
} }
</script> </script>
......
<template> <template>
<div class="headerAll"> <div class="headerAll" v-if=" $route.name == 'assessmentReport'?false:$route.name == 'reportAssess'?false:true">
<div class="header"> <div class="header">
<span class="left-header"> <span class="left-header">
<p style="text-align: center;font-size: 28px;font-weight: bold;color: #fff;line-height: 98px;">XXX</p> <p style="text-align: center;font-size: 28px;font-weight: bold;color: #fff;line-height: 98px;">XXX</p>
......
...@@ -1178,7 +1178,7 @@ export default { ...@@ -1178,7 +1178,7 @@ export default {
background: #ebf0f8;/*20200318*/ background: #ebf0f8;/*20200318*/
padding: 0 45px 0 45px; padding: 0 45px 0 45px;
color: black; color: black;
margin-top: 30px; /* padding-top: 30px; */
} }
.scrollbar { .scrollbar {
......
...@@ -62,11 +62,21 @@ export default { ...@@ -62,11 +62,21 @@ export default {
mounted() { mounted() {
console.log(this.detailData) console.log(this.detailData)
if (this.modalName === '修改规则') { if (this.modalName === '修改规则') {
this.oldRule = { let row = JSON.stringify(this.detailData); //克隆影响原数据需要处理一下
target: this.detailData.target,
suffix: this.detailData.suffix, this.oldRule = JSON.parse(row);
technologyId: this.detailData.technologyId this.form = {
target:this.detailData.target,
suffix:this.detailData.suffix,
technologyId:this.detailData.technologyId,
id:this.detailData.id
} }
// this.oldRule = {
// target: this.detailData.target,
// suffix: this.detailData.suffix,
// technologyId: this.detailData.technologyId
// }
} }
this.getAll(); this.getAll();
}, },
...@@ -90,10 +100,10 @@ export default { ...@@ -90,10 +100,10 @@ export default {
technologyId: this.oldRule.technologyId, technologyId: this.oldRule.technologyId,
technologyName: this.technologyName, technologyName: this.technologyName,
id: this.detailData.id, id: this.detailData.id,
oldRule: this.oldRule oldRule: this.form
}; };
console.log(this.detailData.id) console.log(this.detailData.id)
if (this.detailData.id !== -1) { if (this.modalName === '修改规则') {
this.$server.editConfigUpdate(obj).then(res => { this.$server.editConfigUpdate(obj).then(res => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
......
...@@ -18,6 +18,10 @@ const mutations = { ...@@ -18,6 +18,10 @@ const mutations = {
changeSession(state, payload) { changeSession(state, payload) {
state.session = payload; state.session = payload;
}, },
changeRoutePg(state, payload) {
state.routeClick = payload;
console.log( '修改了',state.routeClick)
},
}; };
export default mutations; export default mutations;
...@@ -6,6 +6,7 @@ const state = { ...@@ -6,6 +6,7 @@ const state = {
nowPath: '', // 当前页面路径 nowPath: '', // 当前页面路径
jumpOther: '', // 跳转到其他页面,修改顶部子菜单样式 jumpOther: '', // 跳转到其他页面,修改顶部子菜单样式
session: '', // 请求session session: '', // 请求session
routeClick: -1, // 请求session
}; };
export default state; export default state;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论