Commit a820827e authored by 王启林's avatar 王启林

配置平台服务

parent 707cc622
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,11 +2,11 @@ import http from "../request/http"; ...@@ -2,11 +2,11 @@ import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.10.1. 查询应用服务列表 // 1.10.1. 查询应用服务列表
export function serviceList(params) { export function serviceList(params) {
return http.post(`${baseURL}/zwfw/system/service/list`, params); return http.post(`${baseURL}/zwfw/product/apps/list`, params);
} }
// 1.10.2. 查看应用服务 // 1.10.2. 查看应用服务
export function serviceInfo(params) { export function serviceInfo(params) {
return http.get(`${baseURL}/zwfw/system/service/info`, params); return http.get(`${baseURL}/zwfw/product/document/list`, params);
} }
// 1.10.3. 保存更新应用服务 // 1.10.3. 保存更新应用服务
export function serviceSave(params) { export function serviceSave(params) {
......
...@@ -45,11 +45,13 @@ ...@@ -45,11 +45,13 @@
:columns="tableHeaders" :dataSource="tableSourceData"> :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="评价人照片" slot-scope="text"> <template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" /> <a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" />
<img v-else :src="baseurl + '/' + text" style="max-width: 100px; max-height: 100px" @click="$viewerApi({images:[baseurl + '/' + text]})"/> <img v-else :src="baseurl + '/' + text" style="max-width: 100px; max-height: 100px"
@click="$viewerApi({ images: [baseurl + '/' + text] })" />
</template> </template>
<template slot="操作" slot-scope="text, record"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button> <a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button>
<a-button type="link" @click="openHandlingDetails(record)">详情</a-button> <a-button type="link" @click="openHandlingDetails(record)"
v-if="record.queueid == 0 && record.pjxt != 1">详情</a-button>
</template> </template>
</a-table> </a-table>
<HandlingDetails ref="HandlingDetails" /> <HandlingDetails ref="HandlingDetails" />
...@@ -324,6 +326,7 @@ export default { ...@@ -324,6 +326,7 @@ export default {
}, },
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
console.log(record)
// 判断为窗口屏或者其他状况,调用不同接口 // 判断为窗口屏或者其他状况,调用不同接口
if (record.pjxt == 1) { if (record.pjxt == 1) {
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
......
...@@ -4,11 +4,7 @@ ...@@ -4,11 +4,7 @@
<div class="search"> <div class="search">
<h1>应用服务</h1> <h1>应用服务</h1>
<div class="search-box"> <div class="search-box">
<a-input <a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="handleSearch" />
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="handleSearch"
/>
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>{{ isSearch ? "重置" : "搜索" }}</span>
</button> </button>
...@@ -19,93 +15,101 @@ ...@@ -19,93 +15,101 @@
<div class="stepbox" :style="{ height: contentHigh + 'px' }"> <div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left"> <div class="_left">
<a-steps progress-dot direction="vertical"> <a-steps progress-dot direction="vertical">
<a-step <a-step v-for="(item, index) in listArr" :status="active === index ? 'process' : 'wait'" :key="index">
v-for="(item, index) in stepsList" <span slot="title" @click="handleChange(item, index)">{{ item.productName }}</span>
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{
item.serviceName
}}</span>
</a-step> </a-step>
</a-steps> </a-steps>
</div> </div>
<div class="_right"> <div class="_right">
<div class="list_box step_sign"> <div class="list_box step_sign">
<div class="title-box"> <div class="title-box">
<span class="list_title">{{ curInfo.serviceName }}</span> <span class="list_title">{{ listArr[active] ? listArr[active].productName : '--' }}</span>
<span class="count primary">{{ curInfo.count }}</span> <span class="count primary">{{ listArr[active].curInfo.length }}</span>
</div> </div>
<div <div v-if="listArr[active].curInfo.length > 0">
class="list flex aic jcb" <div class="list flex aic jcb " v-for="(i, j) in listArr[active].curInfo">
v-for="itm of curInfo.serviceList" <div class="app-name">{{ i.appName }}</div>
:key="itm.id" <img v-if="i.deveLanguage == 1" src="@/assets/images/JAVA.png" alt />
> <img v-if="i.deveLanguage == 2" src="@/assets/images/PHP.png" alt />
<div class="app-name">{{ itm.packageName }}</div> <img v-if="i.deveLanguage == 3" src="@/assets/images/Android.png" alt />
<img src="../../../assets/images/php.png" alt /> <img v-if="i.deveLanguage == 4" src="@/assets/images/Cshape.png" alt />
<div>{{ itm.packageVersion }}</div> <img v-if="i.deveLanguage == 5" src="@/assets/images/Cjj.jpg" alt />
<div class="">{{ itm.packageRemark }}</div> <div>V{{ i.versionNumber }}</div>
<div v-if="itm.lapseTime"> <div>{{ i.versionInfo }}</div>
失效时间:{{ $moment(itm.lapseTime).format("YYYY-MM-DD") }} <div v-if="i.createTime">
{{ $moment(i.createTime).format("YYYY-MM-DD") }}
</div> </div>
<a-button <a-button type="primary" class="addclass" @click="handleDowload(api + i.appFileUrl, i.appName)">
type="primary" class="addclass"
@click="handleDowload(itm.packagePath, itm.systemServiceName)"
>
<a-icon type="download" />下载 <a-icon type="download" />下载
</a-button> </a-button>
</div> </div>
</div> </div>
<div v-else>
<div class="list flex aic jcb ">
<div class="app-name"> 暂无数据</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { serviceList } from "@/api/applService.js"; import { serviceList, } from "@/api/applService.js";
import { getProduct, } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common"; import common from "@/mixins/common";
export default { export default {
name: "PortalAdminVueApplService", name: "PortalAdminVueApplService",
mixins: [common], mixins: [common],
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", listArr: [],
api: process.env.VUE_APP_API_IMG_URL,
searchVal: "", searchVal: "",
stepsList: [], stepsList: [],
active: 0, active: 0,
curInfo: {}, // 当前选中设备信息 curInfo: {}, // 当前选中设备信息
isSearch: false, isSearch: false,
}; };
}, },
created() { created() {
this.getServiceList(); this.getList()
}, },
mounted() { mounted() {
this.setContentHigh(); // this.setContentHigh();
}, },
methods: { methods: {
getServiceList() { getServiceList() {
serviceList({ serviceList({
page: 1, page: 1,
size: -1, //每页条数 size: -1, //每页条数
packageName: `%${this.searchVal}%`, appName: `%${this.searchVal}%`,
}).then((res) => { }).then((res) => {
let { code, data } = res; let { code, data, dict } = res;
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.listArr.forEach(i => {
this.curInfo = data.data[0]; let arr = []
} else { data.data.forEach(k => {
this.curInfo = {}; if (i.id == k.productId) {
arr.push(k)
}
})
i.curInfo = arr
this.$nextTick()
})
} }
} }
}); });
}, },
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch; this.isSearch = !this.isSearch;
if (this.isSearch) { if (this.isSearch) {
this.active = -1;
this.getServiceList(); this.getServiceList();
} else { } else {
this.searchVal = ""; this.searchVal = "";
...@@ -116,27 +120,62 @@ export default { ...@@ -116,27 +120,62 @@ export default {
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.curInfo = row;
this.searchVal = ""; this.searchVal = "";
}, },
handleDowload(url, systemServiceName) { handleDowload(url, systemServiceName) {
console.log(systemServiceName)
const a = document.createElement("a"); const a = document.createElement("a");
a.href = url; a.href = url;
a.download = systemServiceName; a.download = systemServiceName;
a.click(); a.click();
}, },
//获取列表
getList() {
getProduct({ page: 1, size: -1 }).then(res => {
res.data.data.forEach(i => {
i.curInfo = []
})
this.listArr = [...res.data.data]
console.log(this.listArr)
this.getServiceList();
})
}
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.application .stepbox ._right .list>div {
width: 15%;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.application .stepbox ._right .list .app-name {
width: 15%;
text-align: left;
}
/deep/.ant-steps-dot .ant-steps-item-content,
.ant-steps-dot.ant-steps-small .ant-steps-item-content {
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.application { .application {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: #f5f5f5; background: #f5f5f5;
.appl_search { .appl_search {
height: 300px; height: 300px;
text-align: center; text-align: center;
...@@ -145,16 +184,19 @@ export default { ...@@ -145,16 +184,19 @@ export default {
background-size: cover; background-size: cover;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
h1 { h1 {
font-size: 2.4rem; font-size: 2.4rem;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
padding: 4rem 0 2rem; padding: 4rem 0 2rem;
} }
.search-box { .search-box {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/deep/.ant-input { /deep/.ant-input {
width: 30rem !important; width: 30rem !important;
margin-right: 2rem; margin-right: 2rem;
...@@ -180,7 +222,8 @@ export default { ...@@ -180,7 +222,8 @@ export default {
line-height: 42px; line-height: 42px;
padding: 0; padding: 0;
border: none; border: none;
& > span {
&>span {
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
...@@ -224,8 +267,8 @@ export default { ...@@ -224,8 +267,8 @@ export default {
width: 100%; width: 100%;
} }
& > span:before, &>span:before,
& > span:after { &>span:after {
position: absolute; position: absolute;
content: ""; content: "";
left: 0; left: 0;
...@@ -238,21 +281,21 @@ export default { ...@@ -238,21 +281,21 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
& > span:before { &>span:before {
width: 2px; width: 2px;
height: 0%; height: 0%;
} }
& > span:after { &>span:after {
height: 2px; height: 2px;
width: 0%; width: 0%;
} }
& > span:hover:before { &>span:hover:before {
height: 100%; height: 100%;
} }
& > span:hover:after { &>span:hover:after {
width: 100%; width: 100%;
} }
} }
...@@ -263,15 +306,18 @@ export default { ...@@ -263,15 +306,18 @@ export default {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
display: flex; display: flex;
/deep/.ant-steps-item-content { /deep/.ant-steps-item-content {
cursor: pointer; cursor: pointer;
} }
._left { ._left {
width: 300px; width: 300px;
height: 100%; height: 100%;
padding: 20px; padding: 20px;
margin-right: 20px; margin-right: 20px;
overflow: auto; overflow: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -294,6 +340,7 @@ export default { ...@@ -294,6 +340,7 @@ export default {
height: 100%; height: 100%;
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -309,16 +356,20 @@ export default { ...@@ -309,16 +356,20 @@ export default {
border-radius: 3px; border-radius: 3px;
background: #fff; background: #fff;
} }
.title-box { .title-box {
font-size: 24px; font-size: 24px;
.list_title { .list_title {
margin-right: 10px; margin-right: 10px;
font-weight: 600; font-weight: 600;
} }
.count { .count {
font-weight: 600; font-weight: 600;
} }
} }
.list { .list {
width: 100%; width: 100%;
height: 80px; height: 80px;
...@@ -326,13 +377,16 @@ export default { ...@@ -326,13 +377,16 @@ export default {
padding: 0px 20px; padding: 0px 20px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
.app-name { .app-name {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.service-name { .service-name {
font-size: 14px; font-size: 14px;
} }
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
...@@ -340,28 +394,23 @@ export default { ...@@ -340,28 +394,23 @@ export default {
} }
} }
} }
&::before { &::before {
content: ""; content: "";
display: block; display: block;
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient( background: -moz-linear-gradient(174deg,
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); background: -webkit-linear-gradient(174deg,
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); background: linear-gradient(174deg,
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
} }
} }
</style> </style>
\ No newline at end of file
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination" <a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData"> @change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" v-if="record.appFileUrl" <a-button type="link" v-if="record.appFileUrl" @click="handleDowload(record.appFileUrl)">下载应用</a-button>
@click="handleDowload(record.appFileUrl)">下载应用</a-button>
<a-button type="link" @click="openDetails(record)">编辑</a-button> <a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)"> <a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除</a-button> <a-button type="link" style="color: #ff4420">删除</a-button>
...@@ -43,6 +42,9 @@ ...@@ -43,6 +42,9 @@
import { getApps, deleteApps } from "@/api/thePlatformIsSet.js"; import { getApps, deleteApps } from "@/api/thePlatformIsSet.js";
import table from "@/mixins/table"; import table from "@/mixins/table";
import Details from "./components/Details.vue"; import Details from "./components/Details.vue";
let obj = {
}
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVueAlerting", name: "PortalAdminVueAlerting",
...@@ -66,6 +68,7 @@ export default { ...@@ -66,6 +68,7 @@ export default {
title: "开发语言", title: "开发语言",
align: "center", align: "center",
dataIndex: "deveLanguage", dataIndex: "deveLanguage",
customRender: (text, record, index) => this.dict.deveLanguage[text],
}, },
{ {
title: "版本", title: "版本",
...@@ -164,11 +167,12 @@ export default { ...@@ -164,11 +167,12 @@ export default {
handleDowload(url) { handleDowload(url) {
let arr = url.split('/') let arr = url.split('/')
const a = document.createElement("a"); const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL+'/' + url; a.href = process.env.VUE_APP_API_BASE_URL + '/' + url;
a.download = arr[arr.length - 1]; a.download = arr[arr.length - 1];
a.click(); a.click();
}, },
openDetails(item) { openDetails(item) {
if (item) { if (item) {
this.$refs.Details.modalInfo.title = "编辑应用"; this.$refs.Details.modalInfo.title = "编辑应用";
this.$refs.Details.getInfo(item.id) this.$refs.Details.getInfo(item.id)
...@@ -176,6 +180,17 @@ export default { ...@@ -176,6 +180,17 @@ export default {
this.$refs.Details.modalInfo.title = "新增应用"; this.$refs.Details.modalInfo.title = "新增应用";
} }
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
//重置数据
this.$refs.Details.appForm = {
appName: "",
deveLanguage: undefined,
versionNumber: "",
versionInfo: "",
appFileUrl: "",
isEnable: false,
}
this.$refs.Details.uploadInfo.fileList = []
// this.$refs.Details.appForm.resetFields()
this.$refs.Details.modalInfo.width = "30%"; this.$refs.Details.modalInfo.width = "30%";
}, },
......
...@@ -82,11 +82,13 @@ export default { ...@@ -82,11 +82,13 @@ export default {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getInfo(id) { getInfo(id) {
getAppsInfo({ id: id }).then(res => { getAppsInfo({ id: id }).then(res => {
res.data.isEnable = res.data.isEnable == 1 res.data.isEnable = res.data.isEnable == 1
res.data.deveLanguage = this.deveLanguage[res.data.deveLanguage]
this.appForm = res.data this.appForm = res.data
if (res.data.appFileUrl) { if (res.data.appFileUrl) {
this.uploadInfo.fileList = [ this.uploadInfo.fileList = [
......
...@@ -1608,7 +1608,7 @@ ...@@ -1608,7 +1608,7 @@
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7": "@vue/vue-loader-v15@npm:vue-loader@^15.9.7":
version "15.10.1" version "15.10.1"
resolved "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz" resolved "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz"
integrity sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA== integrity sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==
dependencies: dependencies:
"@vue/component-compiler-utils" "^3.1.0" "@vue/component-compiler-utils" "^3.1.0"
...@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3: ...@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3:
vue-hot-reload-api@^2.3.0: vue-hot-reload-api@^2.3.0:
version "2.3.4" version "2.3.4"
resolved "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz" resolved "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-loader@^17.0.0: vue-loader@^17.0.0:
......
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