-
+
@@ -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) {