From 3eb46d507ffa6b43a5fe39ee485932c7e4d94e9d Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Thu, 18 Jun 2020 17:43:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/infoList.vue | 8 +++++-- .../shop-car-apply/apply_service_state.vue | 2 +- src/pages/service_shop/shop_car_apply.vue | 10 +++++---- .../workbench/fwgl/apply_service_detail.vue | 22 ++++++++++--------- .../fwgl/approval_service_detail.vue | 6 +++++ src/pages/workbench/fwgl/serviceDetail.vue | 6 ++--- src/pages/workbench/fwgl/serviceEdit.vue | 2 +- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/components/infoList.vue b/src/components/infoList.vue index 4229469..1339c71 100644 --- a/src/components/infoList.vue +++ b/src/components/infoList.vue @@ -32,8 +32,12 @@ export default { }, methods:{ download(val){ - // this.$emit('download',val) - console.log(val); + // this.$emit('download',val) + console.log(val); + const a = document.createElement('a'); // 创建a标签 + a.setAttribute('download', '');// download属性 + a.setAttribute('href', val);// href链接 + a.click();// 自执行点击事件 } } }; diff --git a/src/components/shop-car-apply/apply_service_state.vue b/src/components/shop-car-apply/apply_service_state.vue index e973d5f..56bfe76 100644 --- a/src/components/shop-car-apply/apply_service_state.vue +++ b/src/components/shop-car-apply/apply_service_state.vue @@ -85,7 +85,7 @@ import uploadFile from "@/components/upload_file"; import tableUm from "@/components/table/table-um"; export default { - props: ["data"], + props: ["data","idx"], components: { uploadFile, tableUm, diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue index 11c5d0a..887e49a 100644 --- a/src/pages/service_shop/shop_car_apply.vue +++ b/src/pages/service_shop/shop_car_apply.vue @@ -191,6 +191,7 @@ export default { }, carts:[] } + var temp1 = this.$refs.apply_service.$refs.apply_service_state this.post_arr.forEach((e,idx) => { if(e.service_id){ temp.carts.push( @@ -202,11 +203,12 @@ export default { "duration_method": e.duration_method, "is_subscribe": e.is_subscribe, "app_id": 0, - "scene":this.$refs.apply_service.$refs.apply_service_state[idx].sceneinput, - "apply_file":this.$refs.apply_service.$refs.apply_service_state[idx].fileList, - "apply_fields":this.$refs.apply_service.$refs.apply_service_state[idx].$refs.apply_service_state_table.metaData + "scene":temp1[idx].sceneinput, + "apply_file":temp1[idx].fileList, + "apply_fields":temp1[idx].$refs.apply_service_state_table.metaData } ) + console.log(temp1[idx].sceneinput); }else{ temp.carts.push( { @@ -251,11 +253,11 @@ export default { .then(response => { console.log(response); let data = response.data.data.valid - this.post_arr = data data.forEach(e => { if(car_arr.indexOf(e.id)==-1){ return } + this.post_arr.push(e) this.service_arr.push({}) let l = this.service_arr.length -1 if(e.app_id){ diff --git a/src/pages/workbench/fwgl/apply_service_detail.vue b/src/pages/workbench/fwgl/apply_service_detail.vue index 0a40ae1..f4e6012 100644 --- a/src/pages/workbench/fwgl/apply_service_detail.vue +++ b/src/pages/workbench/fwgl/apply_service_detail.vue @@ -296,15 +296,15 @@ export default { }, { title:'申请规格:', - info:'访问次数:20/日,访问量:100/日' + info:'' }, { title:'申请时长:', - info:'1年' + info:'' }, { title:'申请时间:', - info:'2020-02-27 12:23:54' + info:'' }, { title:'审批信息', @@ -343,8 +343,9 @@ export default { let data = response.data.data; this.$set(this.service_header_arr, "name", data.name); this.$set(this.service_header_arr['first'][0], 'text', data.data_service_type1_name); - this.$set(this.service_header_arr['first'][1], 'text', data.service_apply_info.approval_status); - this.$set(this.service_header_arr['first'][2], 'text', data.down_time); + this.$set(this.service_header_arr['first'][1], 'text', data.service_apply_info.approval_status==1?'待审批':data.service_apply_info.approval_status==2?'审批中':data.service_apply_info.approval_status==3?'审批通过':'审批未通过'); + this.$set(this.service_header_arr['first'][1], 'color', data.service_apply_info.approval_status==1?'#ef9433':data.service_apply_info.approval_status==2?'#ef9433':data.service_apply_info.approval_status==3?'#515fe7':'#e15260'); + this.$set(this.service_header_arr['first'][2], 'text', data.service_apply_info.service_end_time.replace('T'," ").split('+')[0]); this.$set(this.service_header_arr['second'][0], "text", data.req_url); this.$set(this.service_header_arr, "url", data.cover); this.$set(this.list_arr[0], "info", data.descript); @@ -365,8 +366,9 @@ export default { this.$set(this.apply_arr[3], "info", data.service_apply_info.business_url); this.$set(this.apply_arr[4], "info", data.service_apply_info.apply_file.split('/')[data.service_apply_info.apply_file.split('/').length - 1]); this.$set(this.apply_arr[4], "url", data.service_apply_info.apply_file); - this.$set(this.apply_arr[6], "info", data.service_apply_info.duration+data.service_apply_info.duration_unit); - this.$set(this.apply_arr[7], "info", data.service_apply_info.apply_time); + this.$set(this.apply_arr[6], "info", '访问次数:'+data.service_apply_info.request_spcs.pv+'/日,'+'访问量:'+data.service_apply_info.request_spcs.count+'/日'); + this.$set(this.apply_arr[7], "info", data.service_apply_info.duration + (data.service_apply_info.duration_unit==1?'月':'年')); + this.$set(this.apply_arr[8], "info", data.service_apply_info.apply_time.replace('T'," ").split('+')[0]); this.zd_table_arr = [ { wfwmc:data.name, @@ -376,10 +378,10 @@ export default { } ] console.log(this.zd_table_arr); - data.service_apply_info.approval_process.reverse().forEach(e => { + data.service_apply_info.approval_process.forEach(e => { this.use_approval_arr.push( { - title:e.id==1?'一级审批':'二级审批', + title:e.level==1?'一级审批':'二级审批', result:e.status==-1?'审批未通过':e.status==0?'审批中':'审批通过', } ) @@ -388,7 +390,7 @@ export default { this.use_approval_arr[this.use_approval_arr.length - 1]['arr']=[ { title:'审批时间:', - info:e.approval_time + info:e.approval_time.split('+')[0].replace("T",' ') }, { title:'审批单位:', diff --git a/src/pages/workbench/fwgl/approval_service_detail.vue b/src/pages/workbench/fwgl/approval_service_detail.vue index 1e4a469..294a87b 100644 --- a/src/pages/workbench/fwgl/approval_service_detail.vue +++ b/src/pages/workbench/fwgl/approval_service_detail.vue @@ -187,6 +187,12 @@ export default { servicead_arr: [ [], [ + { + title: "审批信息:", + prop: "title", + type: "solt", + solt_name: "sp_card" + }, { title: "一级审批:", prop: "title", diff --git a/src/pages/workbench/fwgl/serviceDetail.vue b/src/pages/workbench/fwgl/serviceDetail.vue index 23f8f0f..6a9448b 100644 --- a/src/pages/workbench/fwgl/serviceDetail.vue +++ b/src/pages/workbench/fwgl/serviceDetail.vue @@ -425,7 +425,7 @@ export default { "其他", ], open_arr: ["共享", "受限", "敏感"], - service_state_arr: ["已下架", "上架中"], + service_state_arr: ["已下架","已上架", "上架中"], request_arr: ["GET", "POST", "PUT", "DELETE"], list_arr: [ { @@ -554,7 +554,7 @@ export default { this.$set( this.service_header_arr["first"][0], "text", - this.service_type_arr[data.data_service_type1 - 1] + data.data_service_type1_name ); this.$set( this.service_header_arr["first"][1], @@ -586,7 +586,7 @@ export default { this.$set( this.list_arr[1], "info", - this.scrvice_area_arr[data.sectors - 1] + data.sectors_name ); this.$set(this.list_arr[2], "info", data.organization_name); this.$set(this.list_arr[3], "info", data.openness_name); diff --git a/src/pages/workbench/fwgl/serviceEdit.vue b/src/pages/workbench/fwgl/serviceEdit.vue index 5bcb018..df0b9ff 100644 --- a/src/pages/workbench/fwgl/serviceEdit.vue +++ b/src/pages/workbench/fwgl/serviceEdit.vue @@ -323,7 +323,7 @@ export default { max_connections:parseInt(this.maxline), req_intervals:this.open1, max_req_num:parseInt(this.maxline1), - valid_time:this.usetime1, + valid_time:parseInt(this.usetime1), time_unit:this.timevalue, tls:this.open2, } -- 2.26.0