diff --git a/src/App.vue b/src/App.vue index a222344967e33e0d0660d61253f916bad7b34839..efc5e6413f5c0d71529598109670b4b4311c6e15 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,7 +19,6 @@ export default { console.log("--- --- ---"); console.log(data.data); console.log("--- --- ---"); - this.$store.commit("userInfofun", data.data); } else { console.log(data.errMsg); diff --git a/src/components/menu.vue b/src/components/menu.vue index e4564259e5976a000ff91d0a8a48ab679c946b79..bcb544260396b18af014127a442a30813e1e6f3a 100644 --- a/src/components/menu.vue +++ b/src/components/menu.vue @@ -70,7 +70,7 @@ 去购物车申请结算 -
+
diff --git a/src/components/order-list/order-list-cell.vue b/src/components/order-list/order-list-cell.vue index e53ad3ce047bbdce8f3451154eebfd73095a3b9a..c98bcf65039329609c68fb8d4c1ca47500a85374 100644 --- a/src/components/order-list/order-list-cell.vue +++ b/src/components/order-list/order-list-cell.vue @@ -7,10 +7,7 @@
- +
{{ cellItem.name }} @@ -51,12 +48,7 @@ >

服务评价:

- +

填写评价:

@@ -132,7 +124,7 @@ export default { data: () => ({ visible: false, colors: ["#99A9BF", "#F7BA2A", "#FF9900"], - serviceRate: 0, + serviceRate: null, textarea: "", showMsgBox: false, helper: helper, @@ -140,50 +132,57 @@ export default { }), methods: { addEvaluation() { - if (this.cellItem.order_type == 1) { - let query = { - service_id: this.cellItem.service_id, - content: this.textarea, - score: this.serviceRate, - apply_id: this.cellItem.apply_id - }; - this.$api.user.addServiceEvaluation(query).then(response => { - if (response.data.success == 1) { - this.$message({ - message: "评价订单成功", - type: "success" - }); - this.visible = false; - this.$emit("updateList"); - } else { - this.$message({ - message: "评价订单失败", - type: "error" - }); - } - }); - } else if (this.cellItem.order_type == 2) { - let query = { - app: this.cellItem.app_id, - content: this.textarea, - score: this.serviceRate, - apply_id: this.cellItem.apply_id - }; - this.$api.user.addServiceEvaluation(query).then(response => { - if (response.data.success == 1) { - this.$message({ - message: "评价订单成功", - type: "success" - }); - this.visible = false; - this.$emit("updateList"); - } else { - this.$message({ - message: "评价订单失败", - type: "error" - }); - } + if (this.textarea == "" && this.serviceRate == null) { + this.$message({ + message: "请先完善评价内容", + type: "error" }); + } else { + if (this.cellItem.order_type == 1) { + let query = { + service_id: this.cellItem.service_id, + content: this.textarea, + score: this.serviceRate, + apply_id: this.cellItem.apply_id + }; + this.$api.user.addServiceEvaluation(query).then(response => { + if (response.data.success == 1) { + this.$message({ + message: "评价订单成功", + type: "success" + }); + this.visible = false; + this.$emit("updateList"); + } else { + this.$message({ + message: "评价订单失败", + type: "error" + }); + } + }); + } else if (this.cellItem.order_type == 2) { + let query = { + app: this.cellItem.app_id, + content: this.textarea, + score: this.serviceRate, + apply_id: this.cellItem.apply_id + }; + this.$api.user.addServiceEvaluation(query).then(response => { + if (response.data.success == 1) { + this.$message({ + message: "评价订单成功", + type: "success" + }); + this.visible = false; + this.$emit("updateList"); + } else { + this.$message({ + message: "评价订单失败", + type: "error" + }); + } + }); + } } }, viewDetail(val) { diff --git a/src/components/order-list/order-list-list.vue b/src/components/order-list/order-list-list.vue index 8c26af3fba9652fcda06615a853c31e9de97b8b3..4eb91a8c8f3f2c57193ab7b9b5fff3306368982c 100644 --- a/src/components/order-list/order-list-list.vue +++ b/src/components/order-list/order-list-list.vue @@ -8,7 +8,7 @@ 操作
- +
@@ -28,7 +28,11 @@ export default { }, data: () => ({}), mounted() {}, - methods: {} + methods: { + updateList() { + this.emit("updateList"); + } + } }; \ No newline at end of file diff --git a/src/pages/user/order/order_detail.vue b/src/pages/user/order/order_detail.vue index 2187c9eb124a0e4a09a5d3f2c419af23f50e3bae..97858c6d60f18954fe75fe78a7641075a9c48679 100644 --- a/src/pages/user/order/order_detail.vue +++ b/src/pages/user/order/order_detail.vue @@ -69,29 +69,34 @@ class="approval_status_btn" @click="getMessage" >查看评价 - 收起评价 - 再次申请 + 收起评价 + 再次申请
-
服务信息
+
{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息
- +
- 水路货物周转量情况 - + {{ orderDetail.name }} + mapService + 共享 + 受限 + 敏感
-
基础数据服务
-
贵州省交通运输厅
+
{{ orderDetail.sector }}
+
{{ orderDetail.src_organization }}
@@ -99,26 +104,30 @@
规格: - 访问次数:200/日,访问量:10000/日 + 访问次数:{{ orderDetail.spec_svc_count }}/日,访问量:{{ orderDetail.spec_svc_pv }}/日
申请方式: - 按月 + {{orderDetail.duration_unit == 1 ? "按月" : "按年"}}
申请时长: - 5年 + {{ orderDetail.duration + (orderDetail.duration_unit == 1 ? "个月" : "年") }}
应用场景:
-
用于展示车辆位置,用于展示车辆位置,用于展示车辆位置,用于展示车辆位置,用于展示车辆位置,用于展示车辆位置,用于展示车辆位置,用于展示车辆位置,用于展示车辆位置。
+
{{ orderDetail.scene }}
申请内容:
申请人信息
@@ -148,96 +157,97 @@ export default { serviceRate: 0, textarea: "", orderDetail: {}, + orderUser: {}, showMsgBox: false, approval_arr1: [ { title: "一级审批", - result: "审批通过", + result: "", arr: [ { title: "审批时间:", - info: "2020-02-28 15:23:45" + info: "" }, { title: "审批单位:", - info: "某某某城管局" + info: "" }, { title: "审批人:", - info: "张先生" + info: "" }, { title: "审批意见:", - info: "同意" + info: "" } ] }, { title: "二级审批", - result: "审批通过", + result: "", arr: [ { title: "审批时间:", - info: "2020-02-28 15:23:45" + info: "" }, { title: "审批单位:", - info: "某某某城管局" + info: "" }, { title: "审批人:", - info: "张先生" + info: "" }, { title: "审批意见:", - info: "同意" + info: "" } ] }, { title: "三级审批", - result: "审批未通过", + result: "", arr: [ { title: "审批时间:", - info: "2020-02-28 15:23:45" + info: "" }, { title: "审批单位:", - info: "某某某城管局" + info: "" }, { title: "审批人:", - info: "张先生" + info: "" }, { title: "审批意见:", - info: "不同意,驳回。" + info: "" } ] } ], header_arr: [ { - prop: "wfwmc", + prop: "name", label: "微服务名称", minWidth: "20%", align: "left" }, { - prop: "jkzt", + prop: "is_sensituve", label: "健康状态", width: "120px", align: "center" }, { - prop: "jklj", + prop: "is_must", label: "接口链接", minWidth: "40%", align: "center" }, { - prop: "wfwms", + prop: "descript", label: "微服务描述", minWidth: "40%", align: "left" @@ -246,20 +256,20 @@ export default { list_arr: [ { title: "申请人:", - info: "李子维" + info: "" }, { title: "联系方式:", - info: "18342803360" + info: "" }, { title: "申请单位:", - info: "北京比格大数据有限公司" + info: "" }, { title: "申请文件:", - info: "xxxx文件名称.txt", - url: "www.baidu.com", + info: "", + url: "", type: "down" } ], @@ -280,10 +290,69 @@ export default { .then(response => { if (response.data.success == 1) { this.orderDetail = response.data.data; + this.data = JSON.parse(this.orderDetail.res_fields); + this.getOrderUser(); + this.getOrderApproval(); + } else { + console.log(response.data.errMsg); + } + }); + }, + getOrderUser() { + this.$api.user + .getOrderUser({ order_id: this.$route.params.id }) + .then(response => { + if (response.data.success == 1) { + this.list_arr[0].info = response.data.data.name; + this.list_arr[1].info = response.data.data.phone_number; + this.list_arr[2].info = response.data.data.organization; + this.list_arr[3].info = response.data.data.apply_file; + this.list_arr[3].url = response.data.data.apply_file; } else { console.log(response.data.errMsg); } }); + }, + getOrderApproval() { + this.$api.user + .getOrderApproval({ apply_id: this.orderDetail.apply_id }) + .then(response => { + if (response.data.success == 1) { + let data = response.data.data; + for (let i = 0; i < data.length; i++) { + this.approval_arr1[i].result = data[i].apply_type_name; + this.approval_arr1[i].arr[0].info = data[i].created; + this.approval_arr1[i].arr[1].info = data[i].department_name; + this.approval_arr1[i].arr[2].info = data[i].user_name; + this.approval_arr1[i].arr[3].info = data[i].comments; + } + this.approval_arr1.splice(data.length); + } else { + console.log(response.data.errMsg); + } + }); + }, + nextApply() { + let query = {}; + if (this.cellItem.order_type == 1) { + query = { + service_id: parseFloat(this.cellItem.service_id), + spec_id: this.cellItem.svc_spec_id, + duration: this.cellItem.duration, + duration_unit: this.cellItem.duration_unit + }; + } else if (this.cellItem.order_type == 2) { + query = { + app_id: parseFloat(this.cellItem.app_id), + spec_id: this.cellItem.spec_app, + duration: this.cellItem.duration, + duration_unit: this.cellItem.duration_unit + }; + } + this.$router.push({ + path: "/shop/shop_car_apply", + query: query + }); } } }; @@ -307,10 +376,10 @@ export default { text-align: center; } .detail_head_status { - width: 180px; + width: 160px; } .detail_head_no { - width: 240px; + width: 360px; } .detail_head_time { width: 240px; diff --git a/src/request/api/authority.js b/src/request/api/authority.js index b03bb632b43f782579ad14897502e3473c6e5399..c57c1e24af941a4798fc459f850580f4e012bfca 100644 --- a/src/request/api/authority.js +++ b/src/request/api/authority.js @@ -29,7 +29,7 @@ const authority = { // User setUserInfo(params) { - return axios.put(`/apaas/backmgt/user/put`, params); + return axios.put(`/apaas/backmgt/user/put?pageType=${params.pageType}`, params); }, } diff --git a/src/request/api/service_shop.js b/src/request/api/service_shop.js index ec00e0fb10dd32a036197b640edb917248ad0ac3..a83f58d547f2a2af41ef4eaa4284fab2e5c96f05 100644 --- a/src/request/api/service_shop.js +++ b/src/request/api/service_shop.js @@ -32,7 +32,18 @@ Page=${params.Page}&Size=${params.Size}`); return axios.get(`/apaas/hubApi/market/list?online_state=${params.online_state}&appTypes=${params.appTypes}& businessArea=${params.businessArea}&developable=${params.developable}&orgSource=${params.orgSource}&order=${params.order}&page=${params.page}&limit=${params.limit}&search=${params.search}`); }, - + + // cloud + getCloudList() { + return axios.get(`/apaas/serviceapp/v3/resource/list`) + }, + applicationCloud(params) { + return axios.post(`/apaas/serviceapp/v3/resource/apply/new`, params) + }, + updateCloud(params) { + return axios.post(`/apaas/serviceapp/v3/resource/apply/up`, params) + }, + // shopping cart addShoppingCart(params) { return axios.post(`/apaas/serviceapp/v3/shopcart/add`, params); diff --git a/src/request/api/user.js b/src/request/api/user.js index 811dcc010fa3d9399170d5139c8936b7a0ca7586..6ab284d48c5433f5bb3c3755eb213cd66fd153a9 100644 --- a/src/request/api/user.js +++ b/src/request/api/user.js @@ -28,6 +28,13 @@ const user = { getOrderDetail(params) { return axios.get(`/apaas/serviceapp/v3/order/orderInfo?order_id=${params.order_id}`); }, + getOrderUser(params) { + return axios.get(`/apaas/serviceapp/v3/order/applyInfo?order_id=${params.order_id}`); + }, + getOrderApproval(params) { + return axios.get(`/apaas/serviceapp/v3/order/approval?apply_id=${params.apply_id}`); + }, + // user info getNowUser() {