Commit 569c655d authored by 徐一鸣's avatar 徐一鸣

Merge branch 'xym' into dev

parents 69f2de44 c36cbf93
...@@ -4,15 +4,18 @@ ...@@ -4,15 +4,18 @@
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</a> </a>
<div class="app_card-icon"> <div class="app_card-icon">
<el-avatar shape="square" :size="56" fit="cover" :src="data.logo" /> <el-avatar shape="square" :size="56" fit="cover" src="data.logo" />
</div> </div>
<div class="app_card-info"> <div class="app_card-info">
<p <p
class="app_card-name text_clip" class="app_card-name text_clip"
v-text="data.app_name" v-text="cardType == 0 ? data.app_name : data.deploy_name"
@click="intoDetail" @click="intoDetail"
></p> ></p>
<p class="app_card-version text_clip" v-text="data.version"></p> <p
class="app_card-version text_clip"
v-text="cardType == 0 ? data.version : data.app_version"
></p>
</div> </div>
<div class="app_card-action" v-if="cardType == 0"> <div class="app_card-action" v-if="cardType == 0">
<el-button type="primary" plain @click="deploymentAction"> <el-button type="primary" plain @click="deploymentAction">
...@@ -24,7 +27,10 @@ ...@@ -24,7 +27,10 @@
<i class="el-icon-time"></i> <i class="el-icon-time"></i>
<span>上线时间:</span> <span>上线时间:</span>
</span> </span>
<span class="text_clip" v-text="data.created"></span> <span
class="text_clip"
v-text="data.created && data.created.substring(0, 10)"
></span>
</p> </p>
</div> </div>
</template> </template>
......
...@@ -62,7 +62,10 @@ ...@@ -62,7 +62,10 @@
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
<span>规格说明:</span> <span>规格说明:</span>
<span class="commodity_text" v-text="specification.descript"></span> <span
class="commodity_text"
v-text="specification && specification.descript"
></span>
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
<span>购买方式:</span> <span>购买方式:</span>
...@@ -125,10 +128,6 @@ export default { ...@@ -125,10 +128,6 @@ export default {
(item) => item.type == this.type (item) => item.type == this.type
); );
if (this.specification.id === undefined) {
this.specification = specifications[0];
}
return specifications; return specifications;
}, },
}, },
...@@ -146,6 +145,9 @@ export default { ...@@ -146,6 +145,9 @@ export default {
}, },
changeType({ value }) { changeType({ value }) {
this.type = value; this.type = value;
if (this.specifications.length > 0) {
this.specification = this.specifications[0];
}
}, },
addToCart() { addToCart() {
// console.log("addToCart"); // console.log("addToCart");
...@@ -183,6 +185,11 @@ export default { ...@@ -183,6 +185,11 @@ export default {
console.log("applyImmediately"); console.log("applyImmediately");
}, },
}, },
mounted() {
if (this.specifications.length > 0) {
this.specification = this.specifications[0];
}
},
}; };
</script> </script>
......
...@@ -56,12 +56,15 @@ export default { ...@@ -56,12 +56,15 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.data; let datas = data.data;
let specificationData = datas.serviceRequestSpcs.map((item) => ({ let specificationData =
id: item.id, (datas.serviceRequestSpcs &&
type: item.type, datas.serviceRequestSpcs.map((item) => ({
name: `访问次数:${item.pv}/日 访问量:${item.count}/日`, id: item.id,
descript: item.des, type: item.type,
})); name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = { this.baseInfo = {
service_id: this.id, service_id: this.id,
...@@ -180,9 +183,9 @@ export default { ...@@ -180,9 +183,9 @@ export default {
this.specificationData = specificationData; this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.userInfo.picture_path, picture_path: datas.organization_picture,
user_name: datas.userInfo.user_name, user_name: datas.register_user_info.user_name,
phone: datas.userInfo.phone, phone: datas.register_user_info.phone,
}; };
this.commentsData = datas.scoreDetail; this.commentsData = datas.scoreDetail;
}) })
......
...@@ -61,12 +61,14 @@ export default { ...@@ -61,12 +61,14 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.data; let datas = data.data;
let specificationData = datas.serviceRequestSpcs.map((item) => ({ (datas.serviceRequestSpcs &&
id: item.id, datas.serviceRequestSpcs.map((item) => ({
type: item.type, id: item.id,
name: `访问次数:${item.pv}/日 访问量:${item.count}/日`, type: item.type,
descript: item.des, name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
})); descript: item.des,
}))) ||
[];
this.baseInfo = { this.baseInfo = {
service_id: this.id, service_id: this.id,
...@@ -97,7 +99,7 @@ export default { ...@@ -97,7 +99,7 @@ export default {
type: "text", type: "text",
value: datas.descript, value: datas.descript,
}, },
{ /* {
name: "服务属性", // TODO: replace name: "服务属性", // TODO: replace
type: "list", type: "list",
value: [ value: [
...@@ -131,14 +133,14 @@ export default { ...@@ -131,14 +133,14 @@ export default {
value: "禁用", value: "禁用",
}, },
], ],
}, }, */
]; ];
this.specificationData = specificationData; this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.userInfo.picture_path, picture_path: datas.organization_picture,
user_name: datas.userInfo.user_name, user_name: datas.register_user_info.user_name,
phone: datas.userInfo.phone, phone: datas.register_user_info.phone,
}; };
this.commentsData = datas.scoreDetail; this.commentsData = datas.scoreDetail;
}) })
......
...@@ -61,12 +61,14 @@ export default { ...@@ -61,12 +61,14 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.data; let datas = data.data;
let specificationData = datas.serviceRequestSpcs.map((item) => ({ (datas.serviceRequestSpcs &&
id: item.id, datas.serviceRequestSpcs.map((item) => ({
type: item.type, id: item.id,
name: `访问次数:${item.pv}/日 访问量:${item.count}/日`, type: item.type,
descript: item.des, name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
})); descript: item.des,
}))) ||
[];
this.baseInfo = { this.baseInfo = {
service_id: this.id, service_id: this.id,
...@@ -96,7 +98,7 @@ export default { ...@@ -96,7 +98,7 @@ export default {
type: "text", type: "text",
value: datas.descript, value: datas.descript,
}, },
{ /* {
name: "微服务响应列表", // TODO: replace name: "微服务响应列表", // TODO: replace
type: "table", type: "table",
value: { value: {
...@@ -125,14 +127,14 @@ export default { ...@@ -125,14 +127,14 @@ export default {
}, },
], ],
}, },
}, }, */
]; ];
this.specificationData = specificationData; this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.userInfo.picture_path, picture_path: datas.organization_picture,
user_name: datas.userInfo.user_name, user_name: datas.register_user_info.user_name,
phone: datas.userInfo.phone, phone: datas.register_user_info.phone,
}; };
this.commentsData = datas.scoreDetail; this.commentsData = datas.scoreDetail;
}) })
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em> 镜像文件拖到此处,或<em>点击上传</em>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em> 部署文件拖到此处,或<em>点击上传</em>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
...@@ -412,16 +412,16 @@ export default { ...@@ -412,16 +412,16 @@ export default {
this.app_info.logo = response.data; this.app_info.logo = response.data;
}, },
beforeLogoUpload(file) { beforeLogoUpload(file) {
/* const isJPG = file.type === "image/jpeg"; const isPic = file.type === "image/jpeg" || file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < 2; const isLt10M = file.size / 1024 / 1024 < 10;
if (!isJPG) { if (!isPic) {
this.$message.error("上传头像图片只能是 JPG 格式!"); this.$message.error("上传头像图片只能是 JPG 或 PNG 格式!");
} }
if (!isLt2M) { if (!isLt10M) {
this.$message.error("上传头像图片大小不能超过 2MB!"); this.$message.error("上传头像图片大小不能超过 10MB!");
} }
return isJPG && isLt2M; */ return isPic && isLt10M;
}, },
getYwlys() { getYwlys() {
this.$http this.$http
......
...@@ -111,13 +111,11 @@ export default { ...@@ -111,13 +111,11 @@ export default {
{ {
label: "服务领域", label: "服务领域",
prop: "sectors_name", prop: "sectors_name",
type: "",
align: "center", align: "center",
}, },
{ {
label: "开放程度", label: "开放程度",
prop: "openness_name", prop: "openness_name",
type: "",
align: "center", align: "center",
}, },
{ {
...@@ -127,13 +125,15 @@ export default { ...@@ -127,13 +125,15 @@ export default {
{ {
label: "注册发布时间", label: "注册发布时间",
prop: "create_time", prop: "create_time",
type: "", getText(item) {
let create_time = item.create_time || "";
return create_time.substring(0, 10);
},
align: "center", align: "center",
}, },
{ {
label: "服务类型", label: "服务类型",
prop: "data_service_type1_name", prop: "data_service_type1_name",
type: "",
align: "center", align: "center",
}, },
{ {
...@@ -414,6 +414,10 @@ export default { ...@@ -414,6 +414,10 @@ export default {
{ {
label: "注册发布时间", label: "注册发布时间",
prop: "create_time", prop: "create_time",
getText(item) {
let create_time = item.create_time || "";
return create_time.substring(0, 10);
},
align: "center", align: "center",
}, },
{ {
...@@ -675,6 +679,10 @@ export default { ...@@ -675,6 +679,10 @@ export default {
{ {
label: "注册发布时间", label: "注册发布时间",
prop: "create_time", prop: "create_time",
getText(item) {
let create_time = item.create_time || "";
return create_time.substring(0, 10);
},
align: "center", align: "center",
}, },
{ {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment