diff --git a/src/components/infoList.vue b/src/components/infoList.vue index dcf922b2b7f6a8daf07b2a39e0560703966b25d0..422946930e12bd3b72e5fa2b0bec10037033a6ae 100644 --- a/src/components/infoList.vue +++ b/src/components/infoList.vue @@ -32,7 +32,8 @@ export default { }, methods:{ download(val){ - this.$emit('download',val) + // this.$emit('download',val) + console.log(val); } } }; diff --git a/src/components/table/table-um.vue b/src/components/table/table-um.vue index d4aa3948b6ed3e32d8baf8fbc6647ad856f52856..3d6271c123cbf15a481e7b47690beb6596b12834 100644 --- a/src/components/table/table-um.vue +++ b/src/components/table/table-um.vue @@ -397,6 +397,7 @@ export default { }; }, mounted() { + console.log(this.datas); this.getDataFromApiSync(); }, watch: { diff --git a/src/pages/workbench/fwgl/apply_service_detail.vue b/src/pages/workbench/fwgl/apply_service_detail.vue index e1627735297dbebd3d8410de6b3e180ff100f365..607b8e5c343b9f84a4f6867449b4eee40a5ae925 100644 --- a/src/pages/workbench/fwgl/apply_service_detail.vue +++ b/src/pages/workbench/fwgl/apply_service_detail.vue @@ -9,9 +9,9 @@
- - - + + +
@@ -36,6 +36,7 @@ export default { }, data() { return { + use_approval_arr:[], approval_arr:[ { title:'一级审批', @@ -182,26 +183,26 @@ export default { ], service_arr:['服务基本信息','接口详细信息','申请审批信息'], service_header_arr:{ - name:'apaas-mapvideos', + name:'', first:[ { name:'服务类型', - text:'综合服务', + text:'', }, { name:'审批状态', - text:'审批通过', + text:'', color:'#515fe7', }, { name:'服务到期时间', - text:'2020-06-08 17:34:12', + text:'', }, ], second:[ { name:'服务接口地址', - text:'http://localhost:8084/cszh/rest/yxtz/zdrylx?code=430100000000', + text:'', }, ], fixed:false, @@ -210,53 +211,53 @@ export default { list_arr:[ { title:'服务描述:', - info:'地图视频融合服务' + info:'' }, { title:'服务领域:', - info:'城市建设' + info:'' }, { title:'发布人:', - info:'小北' + info:'' }, { title:'联系方式:', - info:'18342803360' + info:'' }, { title:'所属组织:', - info:'北京比格大数据有限公司' + info:'' }, { title:'开放程度:', - info:'共享' + info:'' }, { title:'接口编码:', - info:'chart' + info:'' }, { title:'注册发布时间:', - info:'2019-02-17 21:09:23' + info:'' }, ], servicead_arr:[ { title:'请求方式:', - info:'post' + info:'' }, { title:'请求参数:', - info:'无请求参数' + info:'' }, { title:'请求示例:', - info:'无请求示例' + info:'' }, { title:'编码格式:', - info:'UTF-8' + info:'' }, { title:'响应参数:', @@ -312,6 +313,9 @@ export default { solt_name:'approval' }, ], + request_arr:['','GET','POST','PUT','DELETE'], + res_data:[], + zd_table_arr:[], }; }, watch: { @@ -321,13 +325,89 @@ export default { }, created() { - + this.get_service_info() }, mounted() { }, methods: { + get_service_info(){ + this.$http + .get(`/apaas/service/v3/service/apply/service?apply_id=${this.$route.params.id}`) + .then((response) => { + console.log(response.data.data); + 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['second'][0], "text", data.req_url); + this.$set(this.service_header_arr, "url", data.cover); + this.$set(this.list_arr[0], "info", data.descript); + this.$set(this.list_arr[1], "info", data.data_service_type2_name); + this.$set(this.list_arr[2], "info", data.service_apply_info.apply_user_info.user_name); + this.$set(this.list_arr[3], "info", data.service_apply_info.apply_user_info.phone); + this.$set(this.list_arr[4], "info", data.service_apply_info.apply_user_info.department_name); + this.$set(this.list_arr[5], "info", data.openness_name); + this.$set(this.list_arr[6], "info", data.encode_method); + this.$set(this.list_arr[7], "info", data.create_time.replace('T'," ").split('+')[0]); + this.$set(this.servicead_arr[0], "info", this.request_arr[data.req_type]); + this.$set(this.servicead_arr[1], "info", data.req_query?data.req_query:'无'); + this.$set(this.servicead_arr[2], "info", data.req_fields); + this.$set(this.servicead_arr[3], "info", data.encode_method); + // this.$set(this.apply_arr[0], "info", data.apply_user_info.phone); + this.$set(this.apply_arr[1], "info", data.descript); + this.$set(this.apply_arr[2], "info", data.service_apply_info.business_name); + 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.zd_table_arr = [ + { + wfwmc:data.name, + jkzt:data.health_state, + jklj:data.req_url, + wfwms:data.descript + } + ] + console.log(this.zd_table_arr); + data.service_apply_info.approval_process.reverse().forEach(e => { + this.use_approval_arr.push( + { + title:e.id==1?'一级审批':'二级审批', + result:e.status==-1?'审批未通过':e.status==0?'审批中':'审批通过', + } + ) + + if(e.status!==0){ + this.use_approval_arr[this.use_approval_arr.length - 1]['arr']=[ + { + title:'审批时间:', + info:e.approval_time + }, + { + title:'审批单位:', + info:e.user_info.department_name + }, + { + title:'审批人:', + info:e.user_info.user_name + }, + { + title:'审批意见:', + info:e.comments + }, + ] + + } + }); + this.res_data = JSON.parse(data.res_fields) + }) + .catch(function(response) { + }); + }, }, }; diff --git a/src/pages/workbench/fwgl/approval_service_detail.vue b/src/pages/workbench/fwgl/approval_service_detail.vue index 247a03104f5ce1103fefd27bbfb95f36c0d64bfc..084d2e246e9bbc81bb456b93eef67163f6669a38 100644 --- a/src/pages/workbench/fwgl/approval_service_detail.vue +++ b/src/pages/workbench/fwgl/approval_service_detail.vue @@ -18,7 +18,7 @@
- +
@@ -70,6 +70,8 @@ export default { result:'', option:'' }, + id:'', + zd_table_arr:[], now_user: 1, //0:普通用户,1:组织管理员,2:超级管理员 rules:{ result:[ @@ -90,7 +92,7 @@ export default { }, { label: "不通过", - value: 0 + value: -1 } ], approval_arr:[ @@ -123,31 +125,31 @@ export default { ], header_arr: [ { - prop: "zdmc", + prop: "name", label: "字段名称", minWidth: "20%", align: "left" }, { - prop: "zdbm", + prop: "field_type", label: "字段编码", width: "100px", align: "center" }, { - prop: "zdlx", + prop: "show_type", label: "字段类型", width: "100px", align: "center" }, { - prop: "zdsm", + prop: "descript", label: "字段说明", minWidth: "30%", align: "left" }, { - prop: "zdsl", + prop: "example", label: "字段示例数值", width: "120px", align: "left" @@ -155,26 +157,26 @@ export default { ], service_header_arr: { - name: "apaas-mapvideos", + name: "", first: [ { name: "服务类型", - text: "综合服务" + text: "" }, { name: "服务领域", - text: "经济建设" + text: "" }, { name: "审批状态", - text: "待审批", + text: "", color: "#ef9433" } ], second: [ { name: "申请时间", - text: "2019-02-17 21:56:23" + text: "" } ], fixed: false @@ -264,22 +266,77 @@ export default { onSubmit(formName){ this.$refs[formName].validate((valid) => { if (valid) { - alert('submit!'); + this.set_approval() } else { console.log('error submit!!'); return false; } }); }, + set_approval(){ + this.$http.post('/apaas/service/v3/service/approval/applied/approval',{ + apply_id:this.id, + state:this.form.result, + message:this.form.option + }).then((res)=>{ + console.log(res); + if(res.data.success){ + this.$message.success('审批成功') + this.$router.back(-1) + }else{ + this.$message.error('审批失败') + } + }).catch((res)=>{ + this.$message.error(res) + }) + }, download(val){ console.log(val); }, get_service_info(){ this.$http - .get(`/apaas/service/v3/service/apply/service?apply_id=${this.$route.params.id}`) + .get(`/apaas/service/v3/service/approval/applied?apply_id=${this.$route.params.id}`) .then((response) => { - console.log(response); - + console.log(response.data.data); + 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.data_service_type2_name); + this.$set(this.service_header_arr['first'][2], 'text', data.service_apply_info.approval_status==0?'待审批':data.service_apply_info.approval_status==1?'审批通过':'审批未通过'); + this.$set(this.service_header_arr['second'][0], "text", data.service_apply_info.apply_time.replace('T'," ").split('+')[0]); + this.$set(this.service_header_arr, "url", data.cover); + this.$set(this.list_arr[0], "info", data.service_apply_info.apply_user_info.department_name); + this.$set(this.list_arr[1], "info", data.service_apply_info.apply_user_info.user_name); + this.$set(this.list_arr[2], "info", data.service_apply_info.apply_user_info.phone); + this.$set(this.list_arr[3], "info", data.descript); + this.$set(this.list_arr[4], "info", data.service_apply_info.business_name); + this.$set(this.list_arr[5], "info", data.service_apply_info.business_url); + this.$set(this.list_arr[6], "info", data.service_apply_info.apply_file.split('/')[data.service_apply_info.apply_file.split('/').length - 1]); + this.$set(this.list_arr[6], "url", data.service_apply_info.apply_file); + this.$set(this.list_arr[8], "info", data.service_apply_info.duration+data.service_apply_info.duration_unit); + this.$set(this.list_arr[9], "info", data.request_spcs_info); + this.id = data.service_apply_info.id + if(this.now_user==2){ + this.approval_arr[2].arr=[ + { + title:'审批时间:', + info:data.service_apply_info.approval_process[0].approval_time + }, + { + title:'审批单位:', + info:data.service_apply_info.approval_process[0].user_info.department_name + }, + { + title:'审批人:', + info:data.service_apply_info.approval_process[0].user_info.user_name + }, + { + title:'审批意见:', + info:data.service_apply_info.approval_process[0].comments + }, + ] + } + this.zd_table_arr = data.service_apply_info.res_fields?JSON.parse(data.service_apply_info.res_fields):[] }) .catch(function(response) {