Commit f4f3deac authored by 张俊's avatar 张俊

详情页接口

parent dc45fd14
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
> >
我要修改 我要修改
</span> </span>
<span class="right undersell" v-if="data.deploy" @click="subevent(10)"> <span class="right undersell undersell2" v-if="data.deploy" @click="subevent(10)">
部署 部署
</span> </span>
<span class="right undersell1" v-if="data.undeploy" @click="subevent(9)"> <span class="right undersell1" v-if="data.undeploy" @click="subevent(9)">
...@@ -168,6 +168,14 @@ export default { ...@@ -168,6 +168,14 @@ export default {
this.$emit("debuggerfunc"); this.$emit("debuggerfunc");
} else if (val == 6) { } else if (val == 6) {
this.$emit("applymy"); this.$emit("applymy");
} else if (val == 7) {
this.$emit("unpublic", this.data);
} else if (val == 8) {
this.$emit("public1", this.data);
} else if (val == 9) {
this.$emit("undeploy", this.data);
} else if (val == 10) {
this.$emit("deploy", this.data);
} }
}, },
goto_page(url) { goto_page(url) {
...@@ -276,6 +284,9 @@ export default { ...@@ -276,6 +284,9 @@ export default {
background-color: #e6ebfe; background-color: #e6ebfe;
margin-left: 10px; margin-left: 10px;
} }
.undersell2{
margin-left: 10px;
}
.undermy { .undermy {
background-color: #515fe7; background-color: #515fe7;
color: #e6ebfe; color: #e6ebfe;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="detail_contain"> <div class="detail_contain">
<p class="now_page_title">在线组件工具 / 流程设计 / 流程管理 / <span>详情</span></p> <p class="now_page_title">在线组件工具 / 流程设计 / 流程管理 / <span>详情</span></p>
<div class="info_contain"> <div class="info_contain">
<service-header :data="service_header_arr"></service-header> <service-header :data="service_header_arr" @unpublic="unpublic" @public1="public1" @undeploy="undeploy" @deploy="deploy"></service-header>
<div class="type_box"> <div class="type_box">
<div class="type_title"> <div class="type_title">
<div v-for="(item,index) in service_arr" :key="index+1000" class="type_select" @click="now_service=index" :style="now_service==index?{borderBottom: '4px solid #f5ab4c',color: '#e56600'}:{}">{{item}}</div> <div v-for="(item,index) in service_arr" :key="index+1000" class="type_select" @click="now_service=index" :style="now_service==index?{borderBottom: '4px solid #f5ab4c',color: '#e56600'}:{}">{{item}}</div>
...@@ -82,6 +82,15 @@ ...@@ -82,6 +82,15 @@
</div> </div>
</div> </div>
</div> </div>
<apass-dialog
ref="dialog"
:title="dialogInfo.title"
:msg="dialogInfo.msg"
:cancel-text="dialogInfo.cancelText"
:submit="dialogInfo.submit"
:sunbmit-text="dialogInfo.sunbmitText"
></apass-dialog>
</div> </div>
</template> </template>
...@@ -95,6 +104,7 @@ import lineChart from "@/components/e-charts/line_chart"; ...@@ -95,6 +104,7 @@ import lineChart from "@/components/e-charts/line_chart";
import Toplist from "@/components/e-charts/process-top-list"; import Toplist from "@/components/e-charts/process-top-list";
import BarChart from "@/components/e-charts/bar-chart"; import BarChart from "@/components/e-charts/bar-chart";
import workflowsView from "@/components/work-flow/workflows-view"; import workflowsView from "@/components/work-flow/workflows-view";
import apassDialog from "@/components/apass-dialog";
export default { export default {
components: { components: {
serviceHeader, serviceHeader,
...@@ -104,7 +114,8 @@ export default { ...@@ -104,7 +114,8 @@ export default {
lineChart, lineChart,
Toplist, Toplist,
BarChart, BarChart,
workflowsView workflowsView,
apassDialog
}, },
data(){ data(){
return{ return{
...@@ -128,6 +139,13 @@ export default { ...@@ -128,6 +139,13 @@ export default {
        "timeout_rate": 0,//流程超时率         "timeout_rate": 0,//流程超时率
        "avg_time": 0 // 流程平均耗时         "avg_time": 0 // 流程平均耗时
    },     },
dialogInfo: {
title: "",
msg: "",
cancelText: "",
submit: null,
sunbmitText: "",
},
toplistData:[], toplistData:[],
toplistTargetValue:0, toplistTargetValue:0,
bar_data_org: { bar_data_org: {
...@@ -377,7 +395,7 @@ export default { ...@@ -377,7 +395,7 @@ export default {
}) })
this.service_arr = ['流程基本信息'] this.service_arr = ['流程基本信息']
this.service_header_arr.fixed_process=true this.service_header_arr.fixed_process=true
this.service_header_arr.public=false this.service_header_arr.public=true
this.service_header_arr.unpublic=false this.service_header_arr.unpublic=false
this.service_header_arr.undeploy=false this.service_header_arr.undeploy=false
this.service_header_arr.deploy=true this.service_header_arr.deploy=true
...@@ -388,7 +406,7 @@ export default { ...@@ -388,7 +406,7 @@ export default {
this.$set(this.service_header_arr,'second',[]) this.$set(this.service_header_arr,'second',[])
this.service_header_arr.first.push({ this.service_header_arr.first.push({
name:'工作区域', name:'工作区域',
text:data.workarea text:data.workarea_name
}) })
this.service_header_arr.first.push({ this.service_header_arr.first.push({
name:'流程状态', name:'流程状态',
...@@ -415,7 +433,7 @@ export default { ...@@ -415,7 +433,7 @@ export default {
this.$set(this.service_header_arr,'second',[]) this.$set(this.service_header_arr,'second',[])
this.service_header_arr.first.push({ this.service_header_arr.first.push({
name:'工作区域', name:'工作区域',
text:data.workarea text:data.workarea_name
}) })
this.service_header_arr.first.push({ this.service_header_arr.first.push({
name:'流程状态', name:'流程状态',
...@@ -442,7 +460,83 @@ export default { ...@@ -442,7 +460,83 @@ export default {
this.$set(this.list_arr[0],'info',data.describe) this.$set(this.list_arr[0],'info',data.describe)
this.$set(this.list_arr[1],'info',data.org_name) this.$set(this.list_arr[1],'info',data.org_name)
this.$set(this.list_arr[2],'info',data.create_time.split('+')[0].replace('T',' ')) this.$set(this.list_arr[2],'info',data.create_time.split('+')[0].replace('T',' '))
},
unpublic(item){
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `取消发布后,该流程服务将从服务超市下架,仅部署在工作区域${item.first[0].text}中,是否取消发布流程服务“${item.name}”?`;
this.dialogInfo.cancelText = "暂不";
this.dialogInfo.sunbmitText = "取消发布";
this.dialogInfo.submit = () => {
console.log(`取消发布`);
this.$http
.delete('/apaas/serviceapp/v3/workflows/cancelPublish?id='+this.$route.params.id)
.then(response => {
if(response.data.success){
this.$message.success('取消发布成功')
this.get_process_detail()
this.get_table_service()
} }
})
};
this.showDialog();
},
public1(item){
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `发布后流程后,流程将部署到工作区域并上架到服务超市,是否发布该流程?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "发布";
this.dialogInfo.submit = () => {
this.$router.push('/fwzc/fwcs?process='+this.$route.params.id)
};
this.showDialog();
},
undeploy(item){
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `取消部署后,该流程服务不能通过链接访问,是否取消部署流程服务“${item.name}”?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "取消部署";
this.dialogInfo.submit = () => {
console.log(`取消部署${item.name}`);
this.$http
.delete('/apaas/serviceapp/v3/workflows/cancelDeploy?id='+this.$route.params.id)
.then(response => {
if(response.data.success){
this.$message.success('取消部署成功')
this.get_process_detail()
this.get_table_service()
}
})
};
this.showDialog();
},
deploy(item){
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `部署流程后,流程将部署到工作区域,但不会上架到服务超市,是否部署该流程?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "部署";
this.dialogInfo.submit = () => {
console.log(`部署`);
let form = new FormData()
form.append('id',this.$route.params.id)
this.$http
.post('/apaas/serviceapp/v3/workflows/deploy',form)
.then(response => {
if(response.data.success){
this.$message.success('部署成功')
this.get_process_detail()
this.get_table_service()
}
})
};
this.showDialog();
},
showDialog() {
this.$refs.dialog.show();
},
} }
} }
......
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
data_service_type1:124 data_service_type1:124
}, },
], ],
toplistTargetValue:100, toplistTargetValue:70,
tableheaders:[ tableheaders:[
{ {
label: "排名", label: "排名",
...@@ -225,46 +225,46 @@ export default { ...@@ -225,46 +225,46 @@ export default {
index:1, index:1,
id:1, id:1,
name:'保安许可资格申请', name:'保安许可资格申请',
time:180, time:18,
val:'40%' val:'10%'
}, },
{ {
index:1, index:1,
name:'保安考试流程', name:'保安考试流程',
id:3, id:3,
time:180, time:10,
val:'40%' val:'15%'
}, },
{ {
index:1, index:1,
name:'外国人永久居留资格申请', name:'外国人永久居留资格申请',
id:4, id:4,
time:180, time:20,
val:'40%' val:'30%'
}, },
{ {
index:1, index:1,
name:'大型焰火燃放资格申请', name:'大型焰火燃放资格申请',
id:5, id:5,
time:180, time:35,
val:'40%' val:'20%'
}, },
{ {
index:1, index:1,
id:6, id:6,
name:'保安培训机构许可证申请流程', name:'保安培训机构许可证申请流程',
time:180, time:40,
val:'40%' val:'10%'
}, },
], ],
bar_data_area:{ bar_data_area:{
legendData: ['保安资格','保安资格','保安资格','保安资格'], legendData: ['保安资格','大型焰火燃放资格','外国人永久居留资格','保安培训机构许可证'],
seriesData: [ seriesData: [
55,44,33,22 55,44,33,22
] ]
}, },
bar_data_org:{ bar_data_org:{
legendData: ['保安资格','保安资格','保安资格','保安资格'], legendData: ['保安资格','大型焰火燃放资格','外国人永久居留资格','保安培训机构许可证'],
seriesData: [ seriesData: [
55,44,33,22 55,44,33,22
] ]
...@@ -277,23 +277,23 @@ export default { ...@@ -277,23 +277,23 @@ export default {
}, },
{ {
name:'1小时内', name:'1小时内',
value:10, value:15,
}, },
{ {
name:'1天内', name:'1天内',
value:10, value:20,
}, },
{ {
name:'7天内', name:'7天内',
value:10, value:8,
}, },
{ {
name:'30天内', name:'30天内',
value:10, value:2,
}, },
{ {
name:'30天以上', name:'30天以上',
value:10, value:1,
}, },
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment