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