diff --git a/src/components/app-list/app-card.vue b/src/components/app-list/app-card.vue
index 32fab12b8984ec665aa5c3daee70ba3bc642305d..bd2d80b8a75b9856b231b6ec0dac39569117bc94 100644
--- a/src/components/app-list/app-card.vue
+++ b/src/components/app-list/app-card.vue
@@ -4,15 +4,18 @@
购买方式:
@@ -125,10 +128,6 @@ export default {
(item) => item.type == this.type
);
- if (this.specification.id === undefined) {
- this.specification = specifications[0];
- }
-
return specifications;
},
},
@@ -146,6 +145,9 @@ export default {
},
changeType({ value }) {
this.type = value;
+ if (this.specifications.length > 0) {
+ this.specification = this.specifications[0];
+ }
},
addToCart() {
// console.log("addToCart");
@@ -183,6 +185,11 @@ export default {
console.log("applyImmediately");
},
},
+ mounted() {
+ if (this.specifications.length > 0) {
+ this.specification = this.specifications[0];
+ }
+ },
};
diff --git a/src/pages/service_shop/sjfwDetail.vue b/src/pages/service_shop/sjfwDetail.vue
index 94ce3683095e1b64598acfa02e49683075581906..b2101756bed36fd380cdc41c656f04982680f572 100644
--- a/src/pages/service_shop/sjfwDetail.vue
+++ b/src/pages/service_shop/sjfwDetail.vue
@@ -56,12 +56,15 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
- let specificationData = datas.serviceRequestSpcs.map((item) => ({
- id: item.id,
- type: item.type,
- name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
- descript: item.des,
- }));
+ let specificationData =
+ (datas.serviceRequestSpcs &&
+ datas.serviceRequestSpcs.map((item) => ({
+ id: item.id,
+ type: item.type,
+ name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
+ descript: item.des,
+ }))) ||
+ [];
this.baseInfo = {
service_id: this.id,
@@ -180,9 +183,9 @@ export default {
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
- picture_path: datas.userInfo.picture_path,
- user_name: datas.userInfo.user_name,
- phone: datas.userInfo.phone,
+ picture_path: datas.organization_picture,
+ user_name: datas.register_user_info.user_name,
+ phone: datas.register_user_info.phone,
};
this.commentsData = datas.scoreDetail;
})
diff --git a/src/pages/service_shop/skfwDetail.vue b/src/pages/service_shop/skfwDetail.vue
index 34cbec8877eb48db1ebbdb120523fbae7ee373f2..1d5feda18f912159c89dc6d7f0748d529d162100 100644
--- a/src/pages/service_shop/skfwDetail.vue
+++ b/src/pages/service_shop/skfwDetail.vue
@@ -61,12 +61,14 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
- let specificationData = datas.serviceRequestSpcs.map((item) => ({
- id: item.id,
- type: item.type,
- name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
- descript: item.des,
- }));
+ (datas.serviceRequestSpcs &&
+ datas.serviceRequestSpcs.map((item) => ({
+ id: item.id,
+ type: item.type,
+ name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
+ descript: item.des,
+ }))) ||
+ [];
this.baseInfo = {
service_id: this.id,
@@ -97,7 +99,7 @@ export default {
type: "text",
value: datas.descript,
},
- {
+ /* {
name: "服务属性", // TODO: replace
type: "list",
value: [
@@ -131,14 +133,14 @@ export default {
value: "禁用",
},
],
- },
+ }, */
];
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
- picture_path: datas.userInfo.picture_path,
- user_name: datas.userInfo.user_name,
- phone: datas.userInfo.phone,
+ picture_path: datas.organization_picture,
+ user_name: datas.register_user_info.user_name,
+ phone: datas.register_user_info.phone,
};
this.commentsData = datas.scoreDetail;
})
diff --git a/src/pages/service_shop/zhfwDetail.vue b/src/pages/service_shop/zhfwDetail.vue
index 0854c74c72699d8ceab59c191446c81cec5f76b3..da41905c0296cbbd3c442d86d1ad83ff5a547fe2 100644
--- a/src/pages/service_shop/zhfwDetail.vue
+++ b/src/pages/service_shop/zhfwDetail.vue
@@ -61,12 +61,14 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
- let specificationData = datas.serviceRequestSpcs.map((item) => ({
- id: item.id,
- type: item.type,
- name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
- descript: item.des,
- }));
+ (datas.serviceRequestSpcs &&
+ datas.serviceRequestSpcs.map((item) => ({
+ id: item.id,
+ type: item.type,
+ name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
+ descript: item.des,
+ }))) ||
+ [];
this.baseInfo = {
service_id: this.id,
@@ -96,7 +98,7 @@ export default {
type: "text",
value: datas.descript,
},
- {
+ /* {
name: "微服务响应列表", // TODO: replace
type: "table",
value: {
@@ -125,14 +127,14 @@ export default {
},
],
},
- },
+ }, */
];
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
- picture_path: datas.userInfo.picture_path,
- user_name: datas.userInfo.user_name,
- phone: datas.userInfo.phone,
+ picture_path: datas.organization_picture,
+ user_name: datas.register_user_info.user_name,
+ phone: datas.register_user_info.phone,
};
this.commentsData = datas.scoreDetail;
})
diff --git a/src/pages/workbench/app_build.vue b/src/pages/workbench/app_build.vue
index a80787ce7bfdce24a98df8a3a73d4037f2fbc8b2..5460b96830c1241599fab415779ab394773959a0 100644
--- a/src/pages/workbench/app_build.vue
+++ b/src/pages/workbench/app_build.vue
@@ -48,7 +48,7 @@
>
- 将文件拖到此处,或点击上传
+ 将镜像文件拖到此处,或点击上传
@@ -120,7 +120,7 @@
>
- 将文件拖到此处,或点击上传
+ 将部署文件拖到此处,或点击上传
@@ -412,16 +412,16 @@ export default {
this.app_info.logo = response.data;
},
beforeLogoUpload(file) {
- /* const isJPG = file.type === "image/jpeg";
- const isLt2M = file.size / 1024 / 1024 < 2;
+ const isPic = file.type === "image/jpeg" || file.type === "image/png";
+ const isLt10M = file.size / 1024 / 1024 < 10;
- if (!isJPG) {
- this.$message.error("上传头像图片只能是 JPG 格式!");
+ if (!isPic) {
+ this.$message.error("上传头像图片只能是 JPG 或 PNG 格式!");
}
- if (!isLt2M) {
- this.$message.error("上传头像图片大小不能超过 2MB!");
+ if (!isLt10M) {
+ this.$message.error("上传头像图片大小不能超过 10MB!");
}
- return isJPG && isLt2M; */
+ return isPic && isLt10M;
},
getYwlys() {
this.$http
diff --git a/src/pages/workbench/fwgl/fwglList.vue b/src/pages/workbench/fwgl/fwglList.vue
index b0e2a4d25ee98042c75fdb98eb73490befd7d227..0a1edcdedf9d1be3338c7079500c3e15639b93f4 100644
--- a/src/pages/workbench/fwgl/fwglList.vue
+++ b/src/pages/workbench/fwgl/fwglList.vue
@@ -111,13 +111,11 @@ export default {
{
label: "服务领域",
prop: "sectors_name",
- type: "",
align: "center",
},
{
label: "开放程度",
prop: "openness_name",
- type: "",
align: "center",
},
{
@@ -127,13 +125,15 @@ export default {
{
label: "注册发布时间",
prop: "create_time",
- type: "",
+ getText(item) {
+ let create_time = item.create_time || "";
+ return create_time.substring(0, 10);
+ },
align: "center",
},
{
label: "服务类型",
prop: "data_service_type1_name",
- type: "",
align: "center",
},
{
@@ -414,6 +414,10 @@ export default {
{
label: "注册发布时间",
prop: "create_time",
+ getText(item) {
+ let create_time = item.create_time || "";
+ return create_time.substring(0, 10);
+ },
align: "center",
},
{
@@ -675,6 +679,10 @@ export default {
{
label: "注册发布时间",
prop: "create_time",
+ getText(item) {
+ let create_time = item.create_time || "";
+ return create_time.substring(0, 10);
+ },
align: "center",
},
{
diff --git a/src/pages/workbench/yygl/yyglList.vue b/src/pages/workbench/yygl/yyglList.vue
index daad7dc23e8450ff5749fabf4806044d862c74d6..212030b70bffeb9b34cb65127ef9c0222781c403 100644
--- a/src/pages/workbench/yygl/yyglList.vue
+++ b/src/pages/workbench/yygl/yyglList.vue
@@ -16,7 +16,7 @@
{
- console.log("deleteItem - " + item.name);
- this.$refs.myConfirm.hideModel();
- };
+ if (this.cardType === 0) {
+ if (item.online_state == 0) {
+ this.dialogInfo.title = "";
+ this.dialogInfo.msg = "是否删除该条应用?";
+ this.dialogInfo.cancelText = "";
+ this.dialogInfo.sunbmitText = "";
+ this.dialogInfo.submit = () => {
+ this.$http
+ .delete(`/apaas/hubApi/market/del/${item.app_id}`)
+ .then(({ data }) => {
+ if (data.success) {
+ this.$message({
+ message: `删除${item.app_name}成功.`,
+ type: "success",
+ });
+ this.initDatas(this.tempFliter);
+ } else {
+ this.$message({
+ message: `删除${item.app_name}失败.`,
+ type: "warning",
+ });
+ }
+ })
+ .catch((error) => {
+ this.$message({
+ message: `删除${item.app_name}失败.`,
+ type: "warning",
+ });
+ });
+ };
+ } else {
+ this.dialogInfo.title = "删除提示";
+ this.dialogInfo.msg =
+ "您需要先进行应用商店下架申请,应用处于下架状态时才能进行删除操作。";
+ this.dialogInfo.cancelText = "";
+ this.dialogInfo.sunbmitText = "";
+ this.dialogInfo.submit = () => {
+ if (item.up_deploy_status === 3) {
+ this.$message({
+ message: `${item.app_name}正在申请下架中.`,
+ type: "warning",
+ });
+ } else {
+ this.$http
+ .put(`/apaas/hubApi/market/deployStatus/${item.app_id}/3`)
+ .then(({ data }) => {
+ if (data.success) {
+ this.$message({
+ message: `申请下架${item.app_name}成功.`,
+ type: "success",
+ });
+ this.initDatas(this.tempFliter);
+ } else {
+ this.$message({
+ message: `申请下架${item.app_name}失败.`,
+ type: "warning",
+ });
+ }
+ })
+ .catch((error) => {
+ this.$message({
+ message: `申请下架${item.app_name}失败.`,
+ type: "warning",
+ });
+ });
+ }
+ };
+ }
} else if (this.cardType === 1) {
this.dialogInfo.title = "是否删除部署的应用";
this.dialogInfo.msg =
"该操作会导致正在调用该应用的用户被迫终止对应用的调用,删除前需向正在调用该应用的用户发送通知,自通知发送之日起,2日后应用将被删除。";
- this.dialogInfo.btnCancelText = "";
- this.dialogInfo.btnSubmitText = "发送通知";
- this.dialogInfo.confirmSubmit = () => {
- console.log("deleteItem - " + item.name);
- this.$refs.myConfirm.hideModel();
+ this.dialogInfo.cancelText = "";
+ this.dialogInfo.sunbmitText = "发送通知";
+ this.dialogInfo.submit = () => {
+ this.$http
+ .delete(`/apaas/hubApi/market/deploy/${item.deploy_name}`, {
+ params: {
+ deployId: item.deploy_id,
+ },
+ })
+ .then(({ data }) => {
+ if (data.success) {
+ this.$message({
+ message: `删除${item.deploy_name}成功.`,
+ type: "success",
+ });
+ this.initDatas(this.tempFliter);
+ } else {
+ this.$message({
+ message: `删除${item.deploy_name}失败.`,
+ type: "warning",
+ });
+ }
+ })
+ .catch((error) => {
+ this.$message({
+ message: `删除${item.deploy_name}失败.`,
+ type: "warning",
+ });
+ });
};
}
- this.$refs.myConfirm.showModel(); */
+ this.$refs.dialog.show();
},
+ deploymentAction(item) {
+ console.log("deployment " + item.app_name);
+ console.log("一键部署功能设计中···");
+ }, // TODO: 一键部署功能设计中
changePageSize(value) {
this.pageSize = value;
this.currentPage = 1;
@@ -622,6 +942,15 @@ export default {
deleteItem(item) {
console.log("delete --- " + item.id);
},
+ detailItem(item) {
+ this.$router.push(`${this.detailsUrl + item.app_id}`);
+ },
+ soldUpItem(item) {
+ console.log(`上架${item.app_name}`);
+ },
+ soldOutItem(item) {
+ console.log(`下架${item.app_name}`);
+ },
editItem(item) {
this.$router.push(`/yygl/${this.level}/${this.type}/edit/${item.id}`);
},