Commit c490737e authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 6daca1dd a1151e59
...@@ -18,7 +18,7 @@ module.exports = { ...@@ -18,7 +18,7 @@ module.exports = {
multiPage: true, //多页签模式,true:开启,false:不开启 multiPage: true, //多页签模式,true:开启,false:不开启
cachePage: true, //是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存 cachePage: true, //是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
hideSetting: false, //隐藏设置抽屉,true:隐藏,false:不隐藏 hideSetting: false, //隐藏设置抽屉,true:隐藏,false:不隐藏
systemName: "智慧政务一体化综合管理平台", //系统名称 systemName: "基础设置平台", //系统名称
copyright: "2021 ICZER 信宏翔科技有限公司", //copyright copyright: "2021 ICZER 信宏翔科技有限公司", //copyright
asyncRoutes: false, //异步加载路由,true:开启,false:不开启 asyncRoutes: false, //异步加载路由,true:开启,false:不开启
showPageTitle: true, //是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示 showPageTitle: true, //是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<a-layout-header class="header"> <a-layout-header class="header">
<div class="flex aic"> <div class="flex aic">
<router-link to="/" class="flex aic"> <router-link to="/" class="flex aic">
<!-- <img width="32" src="@/assets/img/logo.png" /> --> <img class="mr10" width="32" src="@/assets/img/logo.png" />
<h1>{{ systemName }}</h1> <h1 class="title">基础设置平台</h1>
</router-link> </router-link>
<HeaderSite class="ml20"></HeaderSite> <HeaderSite class="ml20"></HeaderSite>
</div> </div>
...@@ -72,11 +72,12 @@ export default { ...@@ -72,11 +72,12 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.ant-layout-header { .ant-layout-header {
padding: 0px 24px; padding: 0px 24px;
background-color: #2681e8; // background-color: #2681e8;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: linear-gradient(90deg, #1845c6 0%, #2999ff 100%);
h1 { h1 {
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
...@@ -85,6 +86,10 @@ export default { ...@@ -85,6 +86,10 @@ export default {
a { a {
color: #fff; color: #fff;
} }
.title {
font-size: 20px;
font-weight: bold;
}
} }
.main { .main {
height: calc(100vh - 64px); height: calc(100vh - 64px);
......
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.ant-dropdown-link { .ant-dropdown-link {
padding: 0 20px; padding: 0 20px;
font-size: 14px; font-size: 16px;
min-width: 200px; min-width: 200px;
display: inline-block; display: inline-block;
color: #fff; color: #fff;
......
...@@ -8,9 +8,3 @@ VUE_APP_API_PHP_URL=http://8.136.255.30:8090 ...@@ -8,9 +8,3 @@ VUE_APP_API_PHP_URL=http://8.136.255.30:8090
#宜宾 #宜宾
#VUE_APP_API_BASE_URL=http://10.12.185.213:11072 #VUE_APP_API_BASE_URL=http://10.12.185.213:11072
#正式
VUE_APP_API_PRP_RUL=http://112.19.80.237:11007
#易政秀报表
VUE_APP_API_TEST_RUL=http://8.136.255.30
...@@ -6,3 +6,5 @@ VUE_APP_API_BASE_URL=/basics_api ...@@ -6,3 +6,5 @@ VUE_APP_API_BASE_URL=/basics_api
VUE_APP_API_PHP_URL=/zwfw_api VUE_APP_API_PHP_URL=/zwfw_api
#图片显示拼接 #图片显示拼接
VUE_APP_API_IMG_URL = VUE_APP_API_IMG_URL =
VUE_APP_API_PRP_RUL=http://112.19.80.237:11007
\ No newline at end of file
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_TEST_RUL let baseURL = "http://8.136.255.30"
let proURL = process.env.VUE_APP_API_PRP_RUL; let proURL = process.env.VUE_APP_API_BASE_URL;
// 查询客户管理列表 // 查询客户管理列表
export function getCustomer(params) { export function getCustomer(params) {
...@@ -9,5 +9,5 @@ export function getCustomer(params) { ...@@ -9,5 +9,5 @@ export function getCustomer(params) {
// 窗口列表 // 窗口列表
export function windowList(params) { export function windowList(params) {
return http.post(`${proURL}/basics_api/base/window/list`, params); return http.post(`${proURL}/base/window/list`, params);
} }
...@@ -190,4 +190,4 @@ export function getImpossibleInfo(params) { ...@@ -190,4 +190,4 @@ export function getImpossibleInfo(params) {
*/ */
export function getKqalert(params) { export function getKqalert(params) {
return http.get(`${BASEURL}/admin/kqalert/list`, params); return http.get(`${BASEURL}/admin/kqalert/list`, params);
} }
\ No newline at end of file
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL;
// ----------ps-----------------
// 产品列表
export function getProduct(params) {
return http.post(`${baseURL}/zwfw/product/list`, params);
}
// 保存更新产品
export function saveProduct(params) {
return http.post(`${baseURL}/zwfw/product/save`, params);
}
// 删除产品
export function deleteProduct(params) {
return http.get(`${baseURL}/zwfw/product/delete`, params);
}
// 应用列表
export function getApps(params) {
return http.post(`${baseURL}/zwfw/product/apps/list`, params);
}
// 查看产品应用
export function getAppsInfo(params) {
return http.get(`${baseURL}/zwfw/product/apps/info`, params);
}
// 保存更新产品应用
export function saveApps(params) {
return http.post(`${baseURL}/zwfw/product/apps/save`, params);
}
// 删除产品应用
export function deleteApps(params) {
return http.get(`${baseURL}/zwfw/product/apps/delete`, params);
}
// 查询产品资料列表
export function getDocument(params) {
return http.post(`${baseURL}/zwfw/product/document/list`, params);
}
// 产品资料
export function getDocumentInfo(params) {
return http.get(`${baseURL}/zwfw/product/document/info`, params);
}
// 保存更新产品资料
export function saveDocument(params) {
return http.post(`${baseURL}/zwfw/product/document/save`, params);
}
// 删除产品资料
export function deleteDocument(params) {
return http.get(`${baseURL}/zwfw/product/document/delete`, params);
}
//-------------xj: --------------------
// 产品接口
export function getInterfaceList(params) {
return http.post(`${baseURL}/zwfw/product/interface/list`, params);
}
// 新增编辑产品接口
export function getInterfaceSave(params) {
return http.post(`${baseURL}/zwfw/product/interface/save`, params);
}
// 查看产品接口
export function getInterfaceInfo(params) {
return http.get(`${baseURL}/zwfw/product/interface/info`, params);
}
// 删除产品接口
export function getInterfaceDelete(params) {
return http.get(`${baseURL}/zwfw/product/interface/delete`, params);
}
\ No newline at end of file
<template> <template>
<div class="myUploadFile"> <div class="myUploadFile">
<a-upload <a-upload :name="defaultInfo.name" :action="defaultInfo.action" :listType="defaultInfo.listType"
:name="defaultInfo.name" :multiple="defaultInfo.multiple" :showUploadList="defaultInfo.showUploadList"
:action="defaultInfo.action" :defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled"
:listType="defaultInfo.listType" :directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers"
:multiple="defaultInfo.multiple" :beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview">
:showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.fileList"
:disabled="defaultInfo.disabled"
:directory="defaultInfo.directory"
:data="defaultInfo.objAttach"
:headers="headers"
:beforeUpload="beforeImageUpload"
:remove="uploadRemove"
@change="uploadChange"
@preview="handlePreview"
>
<slot></slot> <slot></slot>
</a-upload> </a-upload>
<a-modal <a-modal :visible="defaultInfo.previewVisible" :footer="null" @cancel="defaultInfo.previewVisible = false">
:visible="defaultInfo.previewVisible"
:footer="null"
@cancel="defaultInfo.previewVisible = false"
>
<img alt="example" style="width: 100%" :src="defaultInfo.previewImage" /> <img alt="example" style="width: 100%" :src="defaultInfo.previewImage" />
</a-modal> </a-modal>
</div> </div>
...@@ -81,20 +66,20 @@ export default { ...@@ -81,20 +66,20 @@ export default {
if (this.defaultInfo["prePath"]) { if (this.defaultInfo["prePath"]) {
this.defaultInfo[ this.defaultInfo[
"action" "action"
] = `${this.VUE_APP_API_BASE_URL}${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`; ] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`;
} else { } else {
this.defaultInfo[ this.defaultInfo[
"action" "action"
] = `${this.VUE_APP_API_BASE_URL}${this.fileCommonupload}`; ] = `${this.fileCommonupload}`;
} }
// console.log(this.defaultInfo); console.log(this.defaultInfo);
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
}, },
created() {}, created() { },
methods: { methods: {
uploadRemove(file) { uploadRemove(file) {
if (file.id != undefined) { if (file.id != undefined) {
...@@ -103,6 +88,10 @@ export default { ...@@ -103,6 +88,10 @@ export default {
this.defaultInfo.fileList = this.defaultInfo.fileList.filter( this.defaultInfo.fileList = this.defaultInfo.fileList.filter(
(item) => item.uid != file.uid (item) => item.uid != file.uid
); );
console.log(this.defaultInfo.fileList.length,"=--------")
if(!this.defaultInfo.fileList.length){
this.$emit("input", ""); //相对地址
}
}, },
beforeImageUpload(file, fileList) { beforeImageUpload(file, fileList) {
let whiteFileList = this.defaultInfo.whiteFileList; //文件类型限制 let whiteFileList = this.defaultInfo.whiteFileList; //文件类型限制
...@@ -128,6 +117,7 @@ export default { ...@@ -128,6 +117,7 @@ export default {
return result; return result;
}, },
uploadChange({ file, fileList }) { uploadChange({ file, fileList }) {
console.log(fileList)
if (file.status === "error") { if (file.status === "error") {
return; return;
this.$message.error(`${file.name} 上传失败.`); this.$message.error(`${file.name} 上传失败.`);
...@@ -139,7 +129,7 @@ export default { ...@@ -139,7 +129,7 @@ export default {
} else if (file.status === "removed") { } else if (file.status === "removed") {
// this.$message.success(`${file.name} 删除成功`); // this.$message.success(`${file.name} 删除成功`);
if (!this.defaultInfo.multiple && this.defaultInfo.limit == 1) { if (!this.defaultInfo.multiple && this.defaultInfo.limit == 1) {
this.$emit("input", undefined); //相对地址 this.$emit("input", ""); //相对地址
} }
} }
this.defaultInfo.fileList = fileList; this.defaultInfo.fileList = fileList;
......
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
props:['src'], props:['src'],
computed:{ computed:{
imgsrc:function(){ imgsrc:function(){
return this.src?`${process.env.VUE_APP_API_BASE_URL}/${this.src}`:require('./thumb.jpg') return this.src?`${process.env.VUE_APP_API_PHP_URL}/${this.src}`:require('./thumb.jpg')
} }
} }
} }
......
...@@ -626,6 +626,15 @@ const routes = [ ...@@ -626,6 +626,15 @@ const routes = [
), ),
meta: { title: "接口信息" }, meta: { title: "接口信息" },
}, },
{
path: "dictionary",
name: "dictionary",
component: () =>
import(
/* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/dictionary/dictionary.vue"
),
meta: { title: "字典管理" },
},
{ {
path: "permissionsModel", path: "permissionsModel",
name: "permissionsModel", name: "permissionsModel",
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<span><i class="lable">评价状态:</i>{{!queEvaData.evaluatestatus?'--':queEvaData.evaluatestatus==1?'等待评价':queEvaData.evaluatestatus==2?'完成':queEvaData.evaluatestatus==3?'截图有误':queEvaData.evaluatestatus==4?'用户截图签名超时':queEvaData.evaluatestatus==5?'用户评价超时':'收到图片等待签名'}}</span> <span><i class="lable">评价状态:</i>{{!queEvaData.evaluatestatus?'--':queEvaData.evaluatestatus==1?'等待评价':queEvaData.evaluatestatus==2?'完成':queEvaData.evaluatestatus==3?'截图有误':queEvaData.evaluatestatus==4?'用户截图签名超时':queEvaData.evaluatestatus==5?'用户评价超时':'收到图片等待签名'}}</span>
<span><i class="lable">评价人照片:</i> <span><i class="lable">评价人照片:</i>
<a-avatar v-if="!queEvaData.picture || !baseurl" shape="square" :size="40" icon="user" /> <a-avatar v-if="!queEvaData.picture || !baseurl" shape="square" :size="40" icon="user" />
<img v-else :src="baseurl+'/'+queEvaData.picture" alt="" srcset="" style="max-width: 100px; max-height: 100px;"> <img v-else :src="baseurl+'/'+queEvaData.picture" @click="$viewerApi({images:[baseurl+'/'+queEvaData.picture]})" alt="" srcset="" style="max-width: 100px; max-height: 100px;">
</span> </span>
</div> </div>
</div> </div>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<span> <span>
<i class="lable">评价人照片:</i> <i class="lable">评价人照片:</i>
<a-avatar v-if="!queEvaData.picture" shape="square" :size="40" icon="user" /> <a-avatar v-if="!queEvaData.picture" shape="square" :size="40" icon="user" />
<img v-else :src="process.env.VUE_APP_API_BASE_URL+'/'+queEvaData.picture" alt="" srcset="" style="max-width: 100px; max-height: 100px;"> <img v-else :src="baseurl+'/'+queEvaData.picture" @click="$viewerApi({images:[baseurl + '/' + queEvaData.picture]})" alt="" srcset="" style="max-width: 100px; max-height: 100px;">
</span> </span>
</div> </div>
</div> </div>
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
data() { data() {
return { return {
queEvaData:{}, queEvaData:{},
baseurl:'', baseurl:process.env.VUE_APP_API_PHP_URL,
}; };
}, },
filters: { filters: {
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
mounted() {}, mounted() {},
created(){ created(){
this.baseurl = process.env.VUE_APP_API_PHP_URL // this.baseurl = process.env.VUE_APP_API_PHP_URL
} }
}; };
</script> </script>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
: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" alt="" srcset="" style="max-width: 100px; max-height: 100px" /> <img v-else :src="baseurl + '/' + text" @click="$viewerApi({images:[baseurl + '/' + text]})" alt="" srcset="" style="max-width: 100px; max-height: 100px" />
</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>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
: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" alt="" srcset="" style="max-width: 100px; max-height: 100px" /> <img v-else :src="baseurl + '/' + text" alt="" srcset="" 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>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
: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" /> <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>
......
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
<p> <p>
<span>预约方式:</span>{{ orderInfo.up_type=='phone'?'微官网':orderInfo.up_type=='app'?'自助终端':orderInfo.up_type=='tftb'?'天府通办':'--' }} <span>预约方式:</span>{{ orderInfo.up_type=='phone'?'微官网':orderInfo.up_type=='app'?'自助终端':orderInfo.up_type=='tftb'?'天府通办':'--' }}
</p> </p>
<p>
<span>预约事项:</span>--
</p>
</div> </div>
<div class="qrcode"> <div class="qrcode">
<!-- <img src="~@/assets/images/logo.png" alt="" /> --> <!-- <img src="~@/assets/images/logo.png" alt="" /> -->
......
...@@ -42,9 +42,10 @@ export default { ...@@ -42,9 +42,10 @@ export default {
}, },
}, },
async mounted() { async mounted() {
let {data} = await getStatisticAges() let res = await getStatisticAges()
let label = data.map(item=> item.age_area) if (res.code != 1) return
let value = data.map(item=> item.nums) let label = res.data.map(item=> item.age_area)
let value = res.data.map(item=> item.nums)
this._initEcharts(label,value); this._initEcharts(label,value);
}, },
methods: { methods: {
......
...@@ -26,8 +26,9 @@ export default { ...@@ -26,8 +26,9 @@ export default {
}, },
}, },
async mounted() { async mounted() {
let {data} = await getStatisticSexual() let res = await getStatisticSexual()
let value = data.map(({idcard_Sex,nums})=>({name:idcard_Sex,value:nums})) if (res.code != 1) return
let value = res.data.map(({idcard_Sex,nums})=>({name:idcard_Sex,value:nums}))
this._initEcharts(value); this._initEcharts(value);
}, },
methods: { methods: {
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
const echarts = this.$echarts; const echarts = this.$echarts;
let option = { let option = {
title: { title: {
text: `{c|${this.info.starttime}~${this.info.endtime}} \n{a|` + this.info.success_rate * 100 + "%" + "}", text: `{c|${this.info.starttime}~${this.info.endtime}} \n{a|` + (this.info.success_rate * 100).toFixed(2) + "%" + "}",
x: "center", x: "center",
y: "center", y: "center",
textStyle: { textStyle: {
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
}, },
data: [ data: [
{ {
value: this.info.success_rate * 100, value: (this.info.success_rate * 100).toFixed(2),
name: "", name: "",
itemStyle: { itemStyle: {
normal: { normal: {
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
}, },
}, },
{ {
value: 100 - (this.info.success_rate * 100), value: 100 - (this.info.success_rate * 100).toFixed(2),
name: "", name: "",
label: { label: {
normal: { normal: {
......
<template> <template>
<div class="CrowdPortrait-Container"> <div class="CrowdPortrait-Container">
<div class="diyufenbu"> <div class="diyufenbu">
<Head :title="'地域分布'"> </Head> <Head :title="'地域分布'">
<template slot="operation">
<a-range-picker valueFormat="YYYY-MM-DD" class="range_picker_style" @change="rangePickerChange"
v-model="BegindAndEndTime" v-if="day == 5">
</a-range-picker>
<a-select v-model="day">
<a-select-option value="0"> 今天 </a-select-option>
<a-select-option value="1"> 近7天 </a-select-option>
<a-select-option value="2"> 近30天 </a-select-option>
<a-select-option value="3"> 近90天 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option>
</a-select>
<a-button type="primary" class="addclass" @click="searchData">搜索</a-button>
</template>
</Head>
<div class="diyufenbu_box"> <div class="diyufenbu_box">
<div class="_left"> <div class="_left">
<div ref="chart" style="width: 100%;height: 100%;"></div> <div ref="chart" style="width: 100%;height: 100%;"></div>
...@@ -9,7 +25,7 @@ ...@@ -9,7 +25,7 @@
<ul class="_right"> <ul class="_right">
<li class="list"> <li class="list">
<span style="margin-right: 20px;">排名</span> <span style="margin-right: 20px;">排名</span>
<i>部门名称</i> <i>地区</i>
<b>预约热度</b> <b>预约热度</b>
</li> </li>
<li class="list" v-for="item,index in area" :key="index"> <li class="list" v-for="item,index in area" :key="index">
...@@ -51,16 +67,16 @@ ...@@ -51,16 +67,16 @@
} from '@/api/dataAdmin.js' } from '@/api/dataAdmin.js'
import axios from 'axios' import axios from 'axios'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import china from "@/assets/json/china.json";
export default { export default {
name: "PortalAdminVueCrowdPortrait", name: "PortalAdminVueCrowdPortrait",
data() { data() {
return { return {
day: '0',
BegindAndEndTime: [],
area: [], area: [],
sign: [], sign: [],
config: { chart: null
bgImgSrc: require('../../../../assets/china.svg')
},
chart:null
}; };
}, },
components: { components: {
...@@ -69,23 +85,31 @@ ...@@ -69,23 +85,31 @@
XingbiePie, XingbiePie,
QiandaoPie, QiandaoPie,
}, },
async mounted() { mounted() {
let { this.init(china)
data this.getStatisticArea()
} = await getStatisticArea() this.getStatisticSignin()
this.area = data
let sign = await getStatisticSignin()
this.sign = sign.data
let point = await axios.get('https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json')
console.log(point)
this.init(point.data)
}, },
methods: { methods: {
// 搜索
searchData() {
this.getStatisticArea()
this.getStatisticSignin()
},
async getStatisticArea() {
let res = await getStatisticArea()
if (res.code != 1) return
this.area = res.data
},
async getStatisticSignin() {
let res = await getStatisticSignin()
if (res.code != 1) return
this.sign = res.data
},
//初始化 //初始化
init(data) { init(data) {
if (this.chart == null) { if (this.chart == null) {
this.chart = echarts.init(this.$refs.chart); this.chart = echarts.init(this.$refs.chart);
} }
echarts.registerMap('china', data); echarts.registerMap('china', data);
var geoGpsMap = [104.64, 28.75]; var geoGpsMap = [104.64, 28.75];
...@@ -96,32 +120,32 @@ ...@@ -96,32 +120,32 @@
'吉林': [125.8154, 44.2584], '吉林': [125.8154, 44.2584],
'北京': [116.4551, 40.2539], '北京': [116.4551, 40.2539],
'辽宁': [123.1238, 42.1216], '辽宁': [123.1238, 42.1216],
// 河北: [114.4995, 38.1006], '河北': [114.4995, 38.1006],
'天津': [117.4219, 39.4189], '天津': [117.4219, 39.4189],
// 山西: [112.3352, 37.9413], '山西': [112.3352, 37.9413],
'陕西': [109.1162, 34.2004], '陕西': [109.1162, 34.2004],
// 甘肃: [103.5901, 36.3043], '甘肃': [103.5901, 36.3043],
// 宁夏: [106.3586, 38.1775], '宁夏': [106.3586, 38.1775],
青海: [101.4038, 36.8207], '青海': [101.4038, 36.8207],
'新疆': [87.9236, 43.5883], '新疆': [87.9236, 43.5883],
'四川': [103.9526, 30.7617], '四川': [103.9526, 30.7617],
// 重庆: [108.384366, 30.439702], '重庆': [108.384366, 30.439702],
'山东': [117.1582, 36.8701], '山东': [117.1582, 36.8701],
// 河南: [113.4668, 34.6234], '河南': [113.4668, 34.6234],
// '安徽': [117.29, 32.0581], '安徽': [117.29, 32.0581],
'湖北': [114.3896, 30.6628], '湖北': [114.3896, 30.6628],
'浙江': [119.5313, 29.8773], '浙江': [119.5313, 29.8773],
// 福建: [119.4543, 25.9222], '福建': [119.4543, 25.9222],
// 江西: [116.0046, 28.6633], '江西': [116.0046, 28.6633],
'湖南': [113.0823, 28.2568], '湖南': [113.0823, 28.2568],
// 贵州: [106.6992, 26.7682], '贵州': [106.6992, 26.7682],
// 云南: [102.9199, 25.4663], '云南': [102.9199, 25.4663],
// 广东: [113.12244, 23.009505], '广东': [113.12244, 23.009505],
// 广西: [108.479, 23.1152], '广西': [108.479, 23.1152],
// 海南: [110.3893, 19.8516], '海南': [110.3893, 19.8516],
'上海': [121.4648, 31.2891], '上海': [121.4648, 31.2891],
'西藏': [91.141017, 29.668461], '西藏': [91.141017, 29.668461],
// 台湾: [121.509062, 25.044332] '台湾': [121.509062, 25.044332]
}; };
var data = []; var data = [];
var mapData = []; var mapData = [];
...@@ -282,7 +306,7 @@ ...@@ -282,7 +306,7 @@
type: 'map', type: 'map',
mapType: 'china', mapType: 'china',
top: '30%', top: '30%',
left: '25%', left: '25%',
zoom: 1.7, zoom: 1.7,
label: { // 地图上的文字 label: { // 地图上的文字
normal: { normal: {
...@@ -294,22 +318,33 @@ ...@@ -294,22 +318,33 @@
}, },
itemStyle: { itemStyle: {
normal: { normal: {
areaColor: '#6194F8', areaColor: {
borderColor: '#fff', image: require('@/assets/images/Banner.png'), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
repeat: 'repeat' // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat'
},
borderColor: '#76C6E7',
borderWidth: 1, borderWidth: 1,
shadowColor: '#CCEAFD', shadowColor: '#CCEAFD',
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 0, shadowOffsetY: 0,
shadowBlur: 0, shadowBlur: 0,
}, },
}, },
emphasis: { // 高亮时区域颜色 emphasis: { // 高亮时区域颜色
itemStyle: { itemStyle: {
areaColor: '#1890FF', areaColor: '#1890FF',
}, },
label: { label: {
color: '#ffffff' color: '#ffffff'
} }
},
select: {
itemStyle: {
areaColor: '#1890FF'
},
label: {
color: '#ffffff'
}
}, },
data: data.map((item, index) => { data: data.map((item, index) => {
return { return {
...@@ -348,27 +383,6 @@ ...@@ -348,27 +383,6 @@
} }
} }
}] }]
},
tooltip: {
show: false,
trigger: 'item',
backgroundColor: '#CCEAFD',
padding: 0,
formatter: function(params) {
var name = params.name || params.seriesName;
var value = params.data.value || 0;
// 实际来源地**
// 最终目的地规模**人
var content = `<div class="info_box">
<div class="info_box_marker"></div>
<div class="info_box_box">
<span class="name">${name}</span>
<span class="value">${value}</span>
<span class="company">人</span>
</div>
</div>`;
return content;
}
} }
}; };
this.chart.setOption(option); this.chart.setOption(option);
...@@ -494,5 +508,84 @@ ...@@ -494,5 +508,84 @@
} }
} }
} }
.range_picker_style {
margin-right: 20px;
// color: #32a6fb !important;
.ant-calendar-picker-input {
// background: transparent !important;
// border-color: #32a6fb !important;
// color: #32a6fb !important;
}
.ant-calendar-range-picker-separator {
// color: #32a6fb !important;
}
::-webkit-input-placeholder {
/* WebKit browsers,webkit内核浏览器 */
// color: #32a6fb;
// font-size: 16px;
}
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
// color: #32a6fb;
// font-size: 16px;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
// color: #32a6fb;
// font-size: 16px;
}
:-ms-input-placeholder {
/* Internet Explorer 10+ */
// color: #32a6fb;
// font-size: 16px;
}
}
/deep/.ant-input-affix-wrapper {
width: 17rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
border-radius: 5px;
background: #1890ff;
box-shadow: rgb(0 0 0 / 5%) 0 0 8px;
letter-spacing: 1.5px;
text-transform: uppercase;
font-size: 0.8rem;
color: hsl(0, 0%, 100%);
transition: all 0.5s ease;
cursor: pointer;
&:hover {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: rgb(93 24 220) 0px 2px 10px 0px;
}
&:active {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: rgb(93 24 220) 0px 0px 0px 0px;
transform: translateY(2px);
transition: 100ms;
}
}
} }
</style> </style>
\ No newline at end of file
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
<div class="search_box" ref="search_box"> <div class="search_box" ref="search_box">
<h3>API服务</h3> <h3>API服务</h3>
<h4> <h4>
<a-input <a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="getServiceApiList" />
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="getServiceApiList"
/>
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>{{ isSearch ? "重置" : "搜索" }}</span>
</button> </button>
...@@ -16,13 +12,9 @@ ...@@ -16,13 +12,9 @@
<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 stepsList" :status="active === index ? 'process' : 'wait'" :key="index">
v-for="(item, index) in stepsList"
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{ <span slot="title" @click="handleChange(item, index)">{{
item.serviceName item.productName
}}</span> }}</span>
</a-step> </a-step>
</a-steps> </a-steps>
...@@ -30,17 +22,13 @@ ...@@ -30,17 +22,13 @@
<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">{{ curApiInfo.serviceName }}</span> <span class="list_title">{{ curApiInfo.name }}</span>
<span class="count primary">{{ curApiInfo.count }}</span> <span class="count primary">{{ curApiInfo.total }}</span>
</div> </div>
<div <div class="list flex aic jcb" v-for="v in curApiInfo.list" :key="v.id">
class="list flex aic jcb" <div class="api-name">{{ v.interfaceName }}</div>
v-for="v in curApiInfo.serviceList" <span class="service-name">{{ v.description }}</span>
:key="v.id" <a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)">
>
<div class="api-name">{{ v.apiName }}</div>
<span class="service-name">{{ v.systemServiceName }}</span>
<a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)">
查看文档 查看文档
</a-button> </a-button>
</div> </div>
...@@ -51,7 +39,8 @@ ...@@ -51,7 +39,8 @@
</template> </template>
<script> <script>
import { serviceApiList } from "@/api/APIServe.js"; // import { serviceApiList } from "@/api/APIServe.js";
import { getProduct, getInterfaceList } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common"; import common from "@/mixins/common";
export default { export default {
name: "PortalAdminVueAPIServe", name: "PortalAdminVueAPIServe",
...@@ -62,6 +51,7 @@ export default { ...@@ -62,6 +51,7 @@ export default {
stepsList: [], stepsList: [],
isSearch: false, isSearch: false,
active: 0, active: 0,
curApiInfo: {}, // 当前api信息 curApiInfo: {}, // 当前api信息
}; };
}, },
...@@ -74,22 +64,35 @@ export default { ...@@ -74,22 +64,35 @@ export default {
methods: { methods: {
getServiceApiList() { getServiceApiList() {
serviceApiList({ getProduct({
page: 1, page: 1,
size: -1, //每页条数 size: -1, //每页条数
apiName: `%${this.searchVal}%`, productName: `%${this.searchVal}%`,
}).then((res) => { }).then((res) => {
let { code, data } = res; let { code, data } = res;
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.stepsList = data.data;
this.curApiInfo = data.data[0]; this.getApiDetail(data.data[0])
} else { } else {
this.curApiInfo = {}; this.curApiInfo = {};
} }
} }
}); });
}, },
getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then((res) => {
let { code, data } = res;
if (code == 1) {
this.curApiInfo = {
name: item.productName,
list: data.data,
total: data.total
}
}
});
},
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch; this.isSearch = !this.isSearch;
if (this.isSearch) { if (this.isSearch) {
...@@ -104,15 +107,14 @@ export default { ...@@ -104,15 +107,14 @@ export default {
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.curApiInfo = row;
this.searchVal = ""; this.searchVal = "";
this.getApiDetail(row)
}, },
pushroeuter() { pushroeuter(v) {
this.$message.warning("暂未开通文档查看"); this.$router.push({
// this.$router.push({ path: "/home/thePlatformIsSet/portDocument",
// path: "/home/thePlatformIsSet/portDocument", query: { id: v.id },
// // query: { testoption: "test001" }, });
// });
}, },
}, },
}; };
...@@ -120,12 +122,14 @@ export default { ...@@ -120,12 +122,14 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.Container { .Container {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #f5f5f5; background: #f5f5f5;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.search_box { .search_box {
height: 300px; height: 300px;
background: url("~@/assets/images/u210.png") top no-repeat; background: url("~@/assets/images/u210.png") top no-repeat;
...@@ -134,16 +138,19 @@ export default { ...@@ -134,16 +138,19 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
h3 { h3 {
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;
} }
h4 { h4 {
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;
...@@ -169,7 +176,8 @@ export default { ...@@ -169,7 +176,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%;
...@@ -213,8 +221,8 @@ export default { ...@@ -213,8 +221,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;
...@@ -227,39 +235,43 @@ export default { ...@@ -227,39 +235,43 @@ 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%;
} }
} }
} }
.stepbox { .stepbox {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
flex: 1; flex: 1;
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;
...@@ -282,6 +294,7 @@ export default { ...@@ -282,6 +294,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;
...@@ -297,16 +310,20 @@ export default { ...@@ -297,16 +310,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;
...@@ -314,38 +331,35 @@ export default { ...@@ -314,38 +331,35 @@ export default {
padding: 0px 20px; padding: 0px 20px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
.api-name { .api-name {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.service-name { .service-name {
font-size: 14px; font-size: 14px;
} }
} }
} }
} }
&::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,
); rgba(59, 135, 255, 1) 24%,
background: -webkit-linear-gradient( rgba(108, 53, 247, 1) 85%);
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);
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> </style>
\ No newline at end of file
<template>
<div class="Container">
<div class="my-card">
<div class="head-menu">
<div>属性字典</div>
</div>
<div class="pd20">
<div class="from-item">
<div class="name">排队机分辨率:</div>
<div>
<a-tag color="blue" closable v-for="item, index in fblList" :key="index">
{{ item.name }}
</a-tag>
</div>
<a-button icon="plus" size="small" @click="addZdShow('fblList', '排队机分辨率')">添加字典值</a-button>
</div>
<div class="from-item">
<div class="name">接口标签:</div>
<div>
<a-tag color="blue" closable v-for="item, index in bqList" :key="index">
{{ item.name }}
</a-tag>
</div>
<a-button icon="plus" size="small" @click="addZdShow('bqList', '接口标签')">添加字典值</a-button>
</div>
</div>
</div>
<a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false"
width="30%">
<a-form-model :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }" layout="horizontal" ref="appInfoFome"
:model="appInfoFome" :rules="appInfoRules">
<a-form-model-item label="字典值" prop="productName">
<a-input placeholder="请输入字典值" allowClear v-model="appInfoFome.productName" />
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">重置</a-button>
</template>
</a-modal>
</div>
</template>
<script>
import common from "@/mixins/common";
export default {
name: "dictionary",
mixins: [common],
data() {
return {
fblList: [{
name: "1920*1080"
}, {
name: "1080*1920"
}, {
name: "1280*1280"
}],
bqList: [
{ name: "政务外网" },
{ name: "便民服务" },
{ name: "三化建设" },
],
VisibleTitle: "",
Visible: false,
appInfoFome: {
productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId"))
}, //页面表单信息
appInfoRules: {
productName: [
{
required: true, //是否必选
whitespace: true, //必选时,空格是否会被视为错误
message: "请输入字典值",
trigger: "blur",
}
],
},
keyName: ""
};
},
created() {
},
mounted() {
},
methods: {
addZdShow(key, title) {
this.Visible = true
this.resetForm()
this.keyName = key
this.VisibleTitle = title
},
Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => {
if (valid) {
this[this.keyName].push({
name: this.appInfoFome.productName
})
this.Visible = false
this.resetForm()
} else {
this.$message.error(`请完善表单信息!`);
return false;
}
});
},
resetForm() {
this.$nextTick(() => {
this.appInfoFome.productName = ''
});
},
},
};
</script>
<style lang="less" scoped>
.from-item {
display: flex;
align-items: center;
margin-bottom: 20px;
.name {
width: 150px;
text-align: right;
padding-right: 20px;
}
}
.Container {
width: 100%;
min-height: 100vh;
background: #f5f5f5;
padding-top: 72px;
.my-card {
margin: 40px 80px;
background: #fff;
border-radius: 6px;
overflow: hidden;
min-height: 500px;
}
.head-menu {
display: flex;
align-items: center;
border-bottom: 1px solid #efefef;
div {
height: 52px;
line-height: 52px;
font-size: 16px;
font-weight: bold;
color: #0595FD;
border-bottom: 2px solid #0595FD;
padding: 0 30px;
margin-left: 20px;
}
}
}
</style>
\ No newline at end of file
<template> <template>
<a-modal <a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false"
:title="VisibleTitle" width="30%">
:centered="true" <a-form-model :label-col="{
:destroyOnClose="true" span: 5,
:visible="Visible" }" :wrapper-col="{
@cancel="Visible = false" span: 19,
width="30%" }" layout="horizontal" ref="appInfoFome" :model="appInfoFome" :rules="appInfoRules">
> <a-form-model-item label="产品名称" prop="productName">
<a-form-model <a-input placeholder="请输入产品名称" allowClear v-model="appInfoFome.productName" />
:label-col="{
span: 5,
}"
:wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appInfoFome"
:model="appInfoFome"
:rules="appInfoRules"
>
<a-form-model-item label="产品名称" prop="appName">
<a-input
placeholder="请输入产品名称"
allowClear
v-model="appInfoFome.appName"
/>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<template slot="footer"> <template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button> <a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">重置</a-button> <a-button @click="resetForm">重置</a-button>
</template> </template>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { saveProduct } from "@/api/thePlatformIsSet.js";
export default { export default {
name: "PortalAdminVueAddEditAppName", name: "PortalAdminVueAddEditAppName",
data() { data() {
...@@ -42,31 +26,38 @@ export default { ...@@ -42,31 +26,38 @@ export default {
Visible: false, //模态 Visible: false, //模态
VisibleTitle: "新增产品", VisibleTitle: "新增产品",
appInfoFome: { appInfoFome: {
appName: undefined, productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId"))
}, //页面表单信息 }, //页面表单信息
appInfoRules: { appInfoRules: {
appName: [ productName: [
{ {
required: true, //是否必选 required: true, //是否必选
whitespace: true, //必选时,空格是否会被视为错误 whitespace: true, //必选时,空格是否会被视为错误
message: "请输入用户名称", message: "请输入产品名称",
trigger: "blur", trigger: "blur",
}, }
// {
// pattern: /^[A-Za-z]+$/,
// message: "请输入正确的用户名格式!",
// },
], ],
}, },
}; };
}, },
mounted() {}, mounted() { },
methods: { methods: {
Modal_Ok() { Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => { this.$refs.appInfoFome.validate((valid) => {
if (valid) { if (valid) {
console.log(this.appInfoFome); saveProduct(this.appInfoFome).then(res => {
let { code, msg } = res
if (code == 1) {
this.$message.success('保存成功');
this.resetForm();
this.Visible = false
this.$parent.getList()
} else {
this.$message.error(msg);
}
})
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
...@@ -75,7 +66,7 @@ export default { ...@@ -75,7 +66,7 @@ export default {
}, },
resetForm() { resetForm() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.appInfoFome.resetFields(); this.appInfoFome.productName = ''
}); });
}, },
}, },
......
...@@ -2,63 +2,45 @@ ...@@ -2,63 +2,45 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<button class="add_btn"> <button class="add_btn" @click="openDetails()">
<span>新增</span> <span>新增</span>
</button> </button>
</div> </div>
<span> <span>
<a-input <a-input allowClear v-model="searchForm.appName" placeholder="请输入应用名称查询">
allowClear
v-model="searchName"
placeholder="请输入应用名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-select default-value="001"> <a-select v-model="searchForm.deveLanguage">
<!-- <a-select-option <a-select-option value="">全部</a-select-option>
v-for="(item, index) of selectOptions" <a-select-option v-for="(item, index) of dict.deveLanguage" :key="index" :value="index">
:key="index" {{ item }}
:value="item.value" </a-select-option>
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 语言001 </a-select-option>
<a-select-option value="002"> 语言002 </a-select-option>
</a-select> </a-select>
<button class="search_btn">搜索</button> <button class="search_btn" @click="getList()">搜索</button>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table <a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
size="small" @change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
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"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link">下载应用{{ index + 1 }}</a-button> <a-button type="link" v-if="record.appFileUrl"
<a-button type="link" @click="openDetails" @click="handleDowload(record.appFileUrl)">下载应用</a-button>
>编辑{{ index + 1 }}</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 type="link" style="color: #ff4420">删除</a-button>
>删除{{ index + 1 }}</a-button </a-popconfirm>
>
</template> </template>
</a-table> </a-table>
<Details ref="Details" /> <Details ref="Details" :deveLanguage="dict.deveLanguage" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
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";
export default { export default {
...@@ -78,34 +60,35 @@ export default { ...@@ -78,34 +60,35 @@ export default {
{ {
title: "应用名称", title: "应用名称",
align: "center", align: "center",
dataIndex: "应用名称", dataIndex: "appName",
}, },
{ {
title: "开发语言", title: "开发语言",
align: "center", align: "center",
dataIndex: "开发语言", dataIndex: "deveLanguage",
}, },
{ {
title: "版本", title: "版本",
align: "center", align: "center",
dataIndex: "版本", dataIndex: "versionNumber",
}, },
{ {
title: "版本信息", title: "版本信息",
align: "center", align: "center",
dataIndex: "版本信息", dataIndex: "versionInfo",
}, },
{ {
title: "是否启用", title: "是否启用",
align: "center", align: "center",
dataIndex: "是否启用", dataIndex: "isEnable",
customRender: (text, record, index) => text == 1 ? '' : "",
}, },
{ {
title: "上传时间", title: "上传时间",
align: "center", align: "center",
dataIndex: "上传时间", dataIndex: "createTime",
customRender: (text, record, index) => this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"),
}, },
{ {
title: "操作", title: "操作",
align: "center", align: "center",
...@@ -116,7 +99,18 @@ export default { ...@@ -116,7 +99,18 @@ export default {
}, },
}, },
], ],
searchName: undefined, tablePagination: {
current: 1,
pageSize: 10
},
searchForm: {
deveLanguage: "",
productId: this.$route.query.id,
},
dict: {
deveLanguage: {},
isEnable: {}
}
}; };
}, },
components: { components: {
...@@ -124,23 +118,66 @@ export default { ...@@ -124,23 +118,66 @@ export default {
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
for (let key = 0; key < 20; key++) { this.getList();
this.tableSourceData.push({
id: `00${key + 1}`,
应用名称: `排队信息查询接口${key + 1}`,
开发语言: `PHP${key + 1}`,
版本: `v${key + 1}.0`,
版本信息: `修复unit功能及部分鉴权问题${key + 1}`,
是否启用: 1,
上传时间: `2022-07-03 20:00:00`,
});
}
}, },
methods: { methods: {
openDetails() { getList(search) {
this.$refs.Details.modalInfo.title = "新增应用"; getApps({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.searchForm,
...search,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
}
})
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.getList();
},
delRow(item) {
deleteApps({
id: item.id
}).then((res) => {
console.log(res)
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
handleDowload(url) {
let arr = url.split('/')
const a = document.createElement("a");
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)
} else {
this.$refs.Details.modalInfo.title = "新增应用";
}
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "30%"; this.$refs.Details.modalInfo.width = "30%";
}, },
}, },
}; };
...@@ -150,13 +187,15 @@ export default { ...@@ -150,13 +187,15 @@ export default {
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block; display: block;
} }
.PoliticsShow-Container { .PoliticsShow-Container {
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
& > div {
&>div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -176,6 +215,7 @@ export default { ...@@ -176,6 +215,7 @@ export default {
overflow: hidden; overflow: hidden;
background: #43a4ff; background: #43a4ff;
color: ghostwhite; color: ghostwhite;
& span { & span {
position: relative; position: relative;
z-index: 10; z-index: 10;
...@@ -211,7 +251,7 @@ export default { ...@@ -211,7 +251,7 @@ export default {
} }
} }
& > span { &>span {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -220,21 +260,26 @@ export default { ...@@ -220,21 +260,26 @@ export default {
width: 15rem !important; width: 15rem !important;
margin-right: 1rem !important; margin-right: 1rem !important;
} }
/deep/.ant-input { /deep/.ant-input {
height: 2.3rem !important; height: 2.3rem !important;
} }
/deep/.ant-select-selection { /deep/.ant-select-selection {
width: 170px !important; width: 170px !important;
height: 2.3rem !important; height: 2.3rem !important;
margin-right: 1rem !important; margin-right: 1rem !important;
} }
/deep/.ant-select-selection__rendered { /deep/.ant-select-selection__rendered {
height: 100% !important; height: 100% !important;
} }
/deep/.ant-select-selection-selected-value { /deep/.ant-select-selection-selected-value {
height: 100% !important; height: 100% !important;
line-height: 2.3rem !important; line-height: 2.3rem !important;
} }
.search_btn { .search_btn {
padding: 0.8rem 1.2rem; padding: 0.8rem 1.2rem;
border: 0; border: 0;
...@@ -266,13 +311,16 @@ export default { ...@@ -266,13 +311,16 @@ export default {
} }
} }
} }
.main { .main {
.type0 { .type0 {
color: #888888; color: #888888;
} }
.type1 { .type1 {
color: #f94545; color: #f94545;
} }
.levelState { .levelState {
padding: 5px 8px; padding: 5px 8px;
border-radius: 8px; border-radius: 8px;
...@@ -280,12 +328,15 @@ export default { ...@@ -280,12 +328,15 @@ export default {
background: #ffedeb; background: #ffedeb;
border: 1px solid #f94545; border: 1px solid #f94545;
} }
.type2 { .type2 {
color: #04ca8f; color: #04ca8f;
} }
/deep/.ant-btn-link { /deep/.ant-btn-link {
padding: 0 !important; padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
......
<template> <template>
<a-modal <a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title"
:width="modalInfo.width" @cancel="modalInfo.visible = false" centered destroyOnClose>
:visible="modalInfo.visible" <a-form-model :label-col="{
:title="modalInfo.title" span: 5,
@cancel="modalInfo.visible = false" }" :wrapper-col="{
centered span: 19,
destroyOnClose }" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules">
> <a-form-model-item label="应用名称" prop="appName">
<a-form-model <a-input v-model="appForm.appName" placeholder="请输入" allowClear />
:label-col="{
span: 5,
}"
:wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="应用名称" prop="应用名称">
<a-input v-model="appForm.应用名称" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="开发语言" prop="开发语言"> <a-form-model-item label="开发语言" prop="deveLanguage">
<a-select v-model="appForm.开发语言" placeholder="请选择" allowClear> <a-select v-model="appForm.deveLanguage" placeholder="请选择" allowClear>
<a-select-option value="001"> 选项001 </a-select-option> <a-select-option v-for="(item, index) of deveLanguage" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本号" prop="版本号"> <a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.版本号" placeholder="请输入" allowClear /> <a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本信息" prop="版本信息"> <a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.版本信息" placeholder="请输入" :rows="4" /> <a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="应用包" prop="应用包"> <a-form-model-item label="应用包" prop="appFileUrl">
<MyUpload <MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo">
v-model="appForm.应用包"
:uploadInfo="uploadInfo"
@uploadChange="uploadChange"
>
<a-button style="background: #04ca8f; color: #fff">上传文件</a-button> <a-button style="background: #04ca8f; color: #fff">上传文件</a-button>
</MyUpload> </MyUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="是否启用" prop="是否启用"> <a-form-model-item label="是否启用" prop="isEnable">
<a-switch v-model="appForm.是否启用" /> <a-switch v-model="appForm.isEnable" />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<template slot="footer"> <template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button> <a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">取消</a-button> <a-button @click="resetForm">取消</a-button>
</template> </template>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { saveApps, getAppsInfo } from "@/api/thePlatformIsSet.js";
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
export default { export default {
name: "PortalAdminVueDetails", name: "PortalAdminVueDetails",
props: ["deveLanguage"],
data() { data() {
return { return {
modalInfo: { modalInfo: {
...@@ -65,12 +52,13 @@ export default { ...@@ -65,12 +52,13 @@ export default {
width: "30%", width: "30%",
}, },
appForm: { appForm: {
应用名称: undefined, productId: this.$route.query.id,
开发语言: undefined, appName: "",
版本号: undefined, deveLanguage: undefined,
版本信息: undefined, versionNumber: "",
应用包: undefined, versionInfo: "",
是否启用: true, appFileUrl: "",
isEnable: false,
}, },
uploadInfo: { uploadInfo: {
removeFileList: [], //移除文件列表 removeFileList: [], //移除文件列表
...@@ -82,23 +70,52 @@ export default { ...@@ -82,23 +70,52 @@ export default {
// 其他参数 data // 其他参数 data
// test: "001", // test: "001",
}, },
verload: 3, // 单位 M verload: 300, // 单位 M
limit: 1, //限制文件上传数量 limit: 1, //限制文件上传数量
whiteFileList: ["apk"], whiteFileList: ["apk"],
}, },
appRules: {}, appRules: {
appName: [{ required: true, message: "请输入应用名称", trigger: ['blur', 'change'] }],
deveLanguage: [{ required: true, message: "请选择开发语言", trigger: ['blur', 'change'] }],
},
}; };
}, },
mounted() {}, mounted() {
},
methods: { methods: {
uploadChange(fileInfo) { getInfo(id) {
this.uploadInfo.fileList = deepClone(fileInfo.fileList); getAppsInfo({ id: id }).then(res => {
res.data.isEnable = res.data.isEnable == 1
this.appForm = res.data
if (res.data.appFileUrl) {
this.uploadInfo.fileList = [
{
uid: id,
name: res.data.appFileUrl,
url: res.data.appFileUrl,
}
]
}
})
}, },
Modal_Ok() { Modal_Ok() {
this.$refs.appForm.validate((valid) => { this.$refs.appForm.validate((valid) => {
if (valid) { if (valid) {
console.log(this.appForm); let json = JSON.parse(JSON.stringify(this.appForm))
json.isEnable = json.isEnable ? 1 : 0
saveApps(json).then(res => {
let { code, msg } = res
if (code == 1) {
this.$message.success('保存成功');
this.resetForm();
this.modalInfo.visible = false
this.$parent.getList()
} else {
this.$message.error(msg);
}
})
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
......
<template> <template>
<a-modal <a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title"
:width="modalInfo.width" @cancel="modalInfo.visible = false" centered destroyOnClose>
:visible="modalInfo.visible" <a-form-model :label-col="{
:title="modalInfo.title" span: 4,
@cancel="modalInfo.visible = false" }" :wrapper-col="{
centered span: 20,
destroyOnClose }" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules">
> <a-form-model-item label="材料名称" prop="docName">
<a-form-model <a-input v-model="appForm.docName" placeholder="请输入" allowClear />
:label-col="{
span: 4,
}"
:wrapper-col="{
span: 20,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="材料名称" prop="材料名称">
<a-input v-model="appForm.材料名称" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本号" prop="版本号"> <a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.版本号" placeholder="请输入" allowClear /> <a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本信息" prop="版本信息"> <a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.版本信息" placeholder="请输入" :rows="4" /> <a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="材料文件" prop="材料文件"> <a-form-model-item label="材料文件" prop="docFileUrl">
<MyUpload <MyUpload v-model="appForm.docFileUrl" :uploadInfo="uploadInfo">
v-model="appForm.材料文件"
:uploadInfo="uploadInfo"
@uploadChange="uploadChange"
>
<a-button style="background: #04ca8f; color: #fff">上传文件</a-button> <a-button style="background: #04ca8f; color: #fff">上传文件</a-button>
</MyUpload> </MyUpload>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<template slot="footer"> <template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button> <a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">取消</a-button> <a-button @click="resetForm">取消</a-button>
</template> </template>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { saveDocument, getDocumentInfo } from "@/api/thePlatformIsSet.js";
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
export default { export default {
name: "PortalAdminVueDetails", name: "PortalAdminVueDetails",
...@@ -58,38 +42,60 @@ export default { ...@@ -58,38 +42,60 @@ export default {
width: "30%", width: "30%",
}, },
appForm: { appForm: {
材料名称: undefined, productId: this.$route.query.id,
版本号: undefined, docName: "",
版本信息: undefined, versionNumber: "",
材料文件: undefined, versionInfo: "",
docFileUrl: ""
}, },
uploadInfo: { uploadInfo: {
removeFileList: [], //移除文件列表 removeFileList: [], //移除文件列表
fileList: [], //文件列表 fileList: [], //文件列表
defaultFileList: [],
multiple: false, //多文件 multiple: false, //多文件
listType: "text", //text, picture 和 picture-card listType: "text", //text, picture 和 picture-card
prePath: "file/fileupload", //附件存放相对路径 否 不填时候默认为 file/fileupload prePath: "file/fileupload", //附件存放相对路径 否 不填时候默认为 file/fileupload
objAttach: { objAttach: {},
// 其他参数 data verload: 300, // 单位 M
// test: "001",
},
verload: 3, // 单位 M
limit: 1, //限制文件上传数量 limit: 1, //限制文件上传数量
whiteFileList: ["doc"], whiteFileList: ["doc", "docx", "pdf", "xlsx", "xls"],
},
appRules: {
docName: [{ required: true, message: "请输入材料名称", trigger: ['blur', 'change'] }],
}, },
appRules: {},
}; };
}, },
mounted() {}, mounted() { },
methods: { methods: {
uploadChange(fileInfo) { getInfo(id) {
this.uploadInfo.fileList = deepClone(fileInfo.fileList); getDocumentInfo({ id: id }).then(res => {
this.appForm = res.data
if (res.data.docFileUrl) {
this.uploadInfo.fileList = [
{
uid: id,
name: res.data.docFileUrl,
url: res.data.docFileUrl,
}
]
}
})
}, },
Modal_Ok() { Modal_Ok() {
this.$refs.appForm.validate((valid) => { this.$refs.appForm.validate((valid) => {
if (valid) { if (valid) {
console.log(this.appForm); saveDocument(this.appForm).then(res => {
let { code, msg } = res
if (code == 1) {
this.$message.success('保存成功');
this.resetForm();
this.modalInfo.visible = false
this.$parent.getList()
} else {
this.$message.error(msg);
}
})
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
......
...@@ -2,55 +2,26 @@ ...@@ -2,55 +2,26 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<button class="add_btn"> <button class="add_btn" @click="openDetails()">
<span>新增</span> <span>新增</span>
</button> </button>
</div> </div>
<span> <span>
<a-input <a-input allowClear v-model="searchName" placeholder="请输入资料名称查询">
allowClear
v-model="searchName"
placeholder="请输入应用名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<button class="search_btn" @click="getList()">搜索</button>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 语言001 </a-select-option>
<a-select-option value="002"> 语言002 </a-select-option>
</a-select>
<button class="search_btn">搜索</button>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table <a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
size="small" @change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
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"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link">下载{{ index + 1 }}</a-button> <a-button type="link" v-if="record.docFileUrl" @click="handleDowload(record.docFileUrl)">下载</a-button>
<a-button type="link" @click="openDetails" <a-button type="link" @click="openDetails(record)">编辑</a-button>
>编辑{{ index + 1 }}</a-button <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-popconfirm>
>删除{{ index + 1 }}</a-button
>
</template> </template>
</a-table> </a-table>
<Details ref="Details" /> <Details ref="Details" />
...@@ -59,6 +30,7 @@ ...@@ -59,6 +30,7 @@
</template> </template>
<script> <script>
import { getDocument, deleteDocument } 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";
export default { export default {
...@@ -78,24 +50,25 @@ export default { ...@@ -78,24 +50,25 @@ export default {
{ {
title: "材料名称", title: "材料名称",
align: "center", align: "center",
dataIndex: "材料名称", dataIndex: "docName",
}, },
{ {
title: "版本", title: "版本",
align: "center", align: "center",
dataIndex: "版本", dataIndex: "versionNumber",
}, },
{ {
title: "材料信息", title: "材料信息",
align: "center", align: "center",
dataIndex: "材料信息", dataIndex: "versionInfo",
}, },
{ {
title: "上传时间", title: "上传时间",
align: "center", align: "center",
dataIndex: "上传时间", dataIndex: "createTime",
customRender: (text, record, index) => this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"),
}, },
{ {
...@@ -109,6 +82,10 @@ export default { ...@@ -109,6 +82,10 @@ export default {
}, },
], ],
searchName: undefined, searchName: undefined,
tablePagination: {
current: 1,
pageSize: 10
},
}; };
}, },
components: { components: {
...@@ -116,21 +93,66 @@ export default { ...@@ -116,21 +93,66 @@ export default {
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
for (let key = 0; key < 20; key++) { this.getList();
this.tableSourceData.push({
id: `00${key + 1}`,
材料名称: `排队信息查询接口${key + 1}`,
版本: `v${key + 1}.0`,
材料信息: `修复unit功能及部分鉴权问题${key + 1}`,
上传时间: `2022-07-03 20:00:00`,
});
}
}, },
methods: { methods: {
openDetails() { getList(search) {
this.$refs.Details.modalInfo.title = "新增材料"; getDocument({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
docName: this.searchName,
productId: this.$route.query.id,
...search,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
}
})
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.getList();
},
delRow(item) {
deleteDocument({
id: item.id
}).then((res) => {
console.log(res)
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
handleDowload(url) {
let arr = url.split('/')
const a = document.createElement("a");
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)
} else {
this.$refs.Details.modalInfo.title = "新增材料";
}
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "27%"; this.$refs.Details.modalInfo.width = "30%";
}, },
}, },
}; };
...@@ -140,13 +162,15 @@ export default { ...@@ -140,13 +162,15 @@ export default {
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block; display: block;
} }
.PoliticsShow-Container { .PoliticsShow-Container {
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
& > div {
&>div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -166,6 +190,7 @@ export default { ...@@ -166,6 +190,7 @@ export default {
overflow: hidden; overflow: hidden;
background: #43a4ff; background: #43a4ff;
color: ghostwhite; color: ghostwhite;
& span { & span {
position: relative; position: relative;
z-index: 10; z-index: 10;
...@@ -201,7 +226,7 @@ export default { ...@@ -201,7 +226,7 @@ export default {
} }
} }
& > span { &>span {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -210,21 +235,26 @@ export default { ...@@ -210,21 +235,26 @@ export default {
width: 15rem !important; width: 15rem !important;
margin-right: 1rem !important; margin-right: 1rem !important;
} }
/deep/.ant-input { /deep/.ant-input {
height: 2.3rem !important; height: 2.3rem !important;
} }
/deep/.ant-select-selection { /deep/.ant-select-selection {
width: 170px !important; width: 170px !important;
height: 2.3rem !important; height: 2.3rem !important;
margin-right: 1rem !important; margin-right: 1rem !important;
} }
/deep/.ant-select-selection__rendered { /deep/.ant-select-selection__rendered {
height: 100% !important; height: 100% !important;
} }
/deep/.ant-select-selection-selected-value { /deep/.ant-select-selection-selected-value {
height: 100% !important; height: 100% !important;
line-height: 2.3rem !important; line-height: 2.3rem !important;
} }
.search_btn { .search_btn {
padding: 0.8rem 1.2rem; padding: 0.8rem 1.2rem;
border: 0; border: 0;
...@@ -256,13 +286,16 @@ export default { ...@@ -256,13 +286,16 @@ export default {
} }
} }
} }
.main { .main {
.type0 { .type0 {
color: #888888; color: #888888;
} }
.type1 { .type1 {
color: #f94545; color: #f94545;
} }
.levelState { .levelState {
padding: 5px 8px; padding: 5px 8px;
border-radius: 8px; border-radius: 8px;
...@@ -270,12 +303,15 @@ export default { ...@@ -270,12 +303,15 @@ export default {
background: #ffedeb; background: #ffedeb;
border: 1px solid #f94545; border: 1px solid #f94545;
} }
.type2 { .type2 {
color: #04ca8f; color: #04ca8f;
} }
/deep/.ant-btn-link { /deep/.ant-btn-link {
padding: 0 !important; padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
......
...@@ -4,29 +4,31 @@ ...@@ -4,29 +4,31 @@
<h3>产品管理</h3> <h3>产品管理</h3>
<h4> <h4>
<a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" /> <a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" />
<button class="search_btn btn"> <button class="search_btn btn" @click="getList">
<span>查询</span> <span>查询</span>
</button> </button>
</h4> </h4>
</div> </div>
<div class="main"> <div class="main">
<a-button type="primary" class="addclass add_btn" ghost @click="showModal(2)"> <a-button type="primary" class="addclass add_btn" ghost @click="showModal()">
新增产品 新增产品
</a-button> </a-button>
<ul class="content"> <ul class="content">
<li class="list" v-for="item of 5" :key="item"> <li class="list" v-for="item, index of listData" :key="index">
<a-popover placement="leftBottom"> <a-popover placement="leftBottom" trigger="click">
<template slot="content"> <template slot="content">
<div class="popoverContent"> <div class="popoverContent">
<p> <p>
<a-button type="link" size="small" style="color: #0595fd" @click="showModal(1)"> <a-button type="link" size="small" style="color: #0595fd" @click="showModal(item)">
编辑 编辑
</a-button> </a-button>
</p> </p>
<p> <p>
<a-button type="link" size="small" style="color: #ff4d4f"> <a-popconfirm title="确定要删除此产品吗?" ok-text="确定" cancel-text="取消" @confirm="delModal(item)">
删除 <a-button type="link" size="small" style="color: #ff4d4f">
</a-button> 删除
</a-button>
</a-popconfirm>
</p> </p>
</div> </div>
</template> </template>
...@@ -34,13 +36,15 @@ ...@@ -34,13 +36,15 @@
</a-popover> </a-popover>
<img src="~@/assets/images/u52.png" alt="" class="app-img" /> <img src="~@/assets/images/u52.png" alt="" class="app-img" />
<div class="app-name">排号系统</div> <div class="app-name">{{ item.productName }}</div>
<ul class="app-option"> <ul class="app-option">
<li @click="routerpush1">接口管理<a-icon type="right" /></li> <li @click="routerpush1(item)">接口管理<a-icon type="right" /></li>
<li @click="routerpush2">应用管理<a-icon type="right" /></li> <li @click="routerpush2(item)">应用管理<a-icon type="right" /></li>
<li @click="routerpush3">文档资料<a-icon type="right" /></li> <li @click="routerpush3(item)">文档资料<a-icon type="right" /></li>
</ul> </ul>
</li> </li>
<div class="not-data" v-if="!listData.length">暂无数据</div>
</ul> </ul>
</div> </div>
<AddEditAppName ref="AddEditAppName" /> <AddEditAppName ref="AddEditAppName" />
...@@ -48,52 +52,74 @@ ...@@ -48,52 +52,74 @@
</template> </template>
<script> <script>
import { getProduct, deleteProduct } from "@/api/thePlatformIsSet.js";
import AddEditAppName from "./components/addEditAppName.vue"; import AddEditAppName from "./components/addEditAppName.vue";
export default { export default {
name: "PortalAdminVueProductManage", name: "PortalAdminVueProductManage",
data() { data() {
return { return {
searchVal: undefined, searchVal: '',
listData: []
}; };
}, },
components: { components: {
AddEditAppName, AddEditAppName,
}, },
mounted() { }, mounted() {
this.getList()
},
methods: { methods: {
pushroeuter() { delModal(item) {
this.$router.push({ deleteProduct({
path: "/home/thePlatformIsSet/portDocument", id: item.id
// query: { testoption: "test001" }, }).then((res) => {
}); let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
getList() {
getProduct({
page: 1,
size: -1,
productName: this.searchVal
}).then((res) => {
this.listData = res.data.data
})
}, },
showModal(type) { showModal(item) {
if (type == 1) { if (item) {
this.$refs.AddEditAppName.VisibleTitle = "编辑"; this.$refs.AddEditAppName.VisibleTitle = "编辑";
} else if (type == 2) { this.$refs.AddEditAppName.appInfoFome.id = item.id
this.$refs.AddEditAppName.appInfoFome.productName = item.productName
} else {
this.$refs.AddEditAppName.VisibleTitle = "新增产品"; this.$refs.AddEditAppName.VisibleTitle = "新增产品";
} }
this.$refs.AddEditAppName.Visible = true; this.$refs.AddEditAppName.Visible = true;
}, },
routerpush1() { routerpush1(item) {
// 测试 // 测试
this.$router.push({ this.$router.push({
path: `/home/thePlatformIsSet/InterfaceManage/manage`, path: `/home/thePlatformIsSet/InterfaceManage/manage`,
// query: { testoption: "test001" }, query: { id: item.id },
}); });
}, },
routerpush2() { routerpush2(item) {
// 测试 // 测试
this.$router.push({ this.$router.push({
path: `/home/thePlatformIsSet/appManage/application`, path: `/home/thePlatformIsSet/appManage/application`,
// query: { testoption: "test001" }, query: { id: item.id },
}); });
}, },
routerpush3() { routerpush3(item) {
// 测试 // 测试
this.$router.push({ this.$router.push({
path: `/home/thePlatformIsSet/docData/fileData`, path: `/home/thePlatformIsSet/docData/fileData`,
// query: { testoption: "test001" }, query: { id: item.id },
}); });
}, },
}, },
...@@ -101,6 +127,13 @@ export default { ...@@ -101,6 +127,13 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.not-data{
line-height: 100px;
text-align: center;
width: 100%;
color: #999;
font-size: 14px;
}
@headerH: 4.5rem; @headerH: 4.5rem;
.Container { .Container {
...@@ -319,4 +352,5 @@ export default { ...@@ -319,4 +352,5 @@ export default {
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>
This diff is collapsed.
...@@ -19,32 +19,33 @@ CREATE TABLE `mortals_xhx_product` ( ...@@ -19,32 +19,33 @@ CREATE TABLE `mortals_xhx_product` (
-- 产品接口表 -- 产品接口表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_product_interface`; DROP TABLE IF EXISTS `mortals_xhx_product_interface`;
CREATE TABLE `mortals_xhx_product_interface` ( CREATE TABLE mortals_xhx_product_interface(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`productId` bigint(20) NOT NULL COMMENT '产品id', `productId` bigint(20) NOT NULL COMMENT '产品id',
`interfaceName` varchar(128) NOT NULL COMMENT '接口名称', `interfaceName` varchar(128) NOT NULL COMMENT '接口名称',
`versionNumber` varchar(64) NOT NULL COMMENT '版本号', `versionNumber` varchar(64) NOT NULL COMMENT '版本号',
`requestType` tinyint(2) DEFAULT '1' COMMENT '请求类型1:POST,2:GET', `requestType` tinyint(2) DEFAULT '1' COMMENT '请求类型1:POST,2:GET',
`requestProtocol` tinyint(2) DEFAULT '1' COMMENT '请求协议1:HTTP,2:HTTPS', `requestProtocol` tinyint(2) DEFAULT '1' COMMENT '请求协议1:HTTP,2:HTTPS',
`requestUrl` varchar(128) DEFAULT NULL COMMENT '请求路径', `requestUrl` varchar(128) COMMENT '请求路径',
`timeoutValue` int(8) DEFAULT NULL COMMENT '超时时间(秒)', `timeoutValue` int(8) COMMENT '超时时间(秒)',
`limitStrategy` tinyint(2) DEFAULT NULL COMMENT '限流策略1:分钟,2:小时', `limitStrategy` tinyint(2) COMMENT '限流策略1:分钟,2:小时',
`network` varchar(64) DEFAULT NULL COMMENT '访问网络1互联网2政务网', `network` varchar(64) COMMENT '访问网络1互联网2政务网',
`description` text COMMENT '接口描述', `description` text COMMENT '接口描述',
`flowControl` text COMMENT '流控信息', `contentType` varchar(128) COMMENT '内容类型',
`authorizeInfo` text COMMENT '授权信息', `interfaceTag` tinyint(2) COMMENT '标签',
`interfaceTag` tinyint(2) DEFAULT NULL COMMENT '标签', `interfaceSource` tinyint(2) DEFAULT '1' COMMENT '来源1自有2非自有',
`interfaceSource` tinyint(2) DEFAULT '1' COMMENT '来源1自有2非自有', `inEncrypt` tinyint(2) COMMENT '入参是否加密',
`requestParameters` text COMMENT '请求参数', `requestParameters` text COMMENT '请求参数',
`responseParameters` text COMMENT '响应数据', `outEncrypt` tinyint(2) COMMENT '出参是否加密',
`errorCode` text COMMENT '错误码', `responseParameters` text COMMENT '响应数据',
`changeHistory` text COMMENT '变更历史', `remark` text COMMENT '接口描述',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户', `createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) DEFAULT NULL COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime DEFAULT NULL COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品接口表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品接口';
-- ---------------------------- -- ----------------------------
-- 产品应用表 -- 产品应用表
......
...@@ -33,9 +33,12 @@ public class ProductInterfaceController extends BaseCRUDJsonBodyMappingControlle ...@@ -33,9 +33,12 @@ public class ProductInterfaceController extends BaseCRUDJsonBodyMappingControlle
this.addDict(model, "requestType", paramService.getParamBySecondOrganize("ProductInterface","requestType")); this.addDict(model, "requestType", paramService.getParamBySecondOrganize("ProductInterface","requestType"));
this.addDict(model, "requestProtocol", paramService.getParamBySecondOrganize("ProductInterface","requestProtocol")); this.addDict(model, "requestProtocol", paramService.getParamBySecondOrganize("ProductInterface","requestProtocol"));
this.addDict(model, "limitStrategy", paramService.getParamBySecondOrganize("ProductInterface","limitStrategy")); this.addDict(model, "limitStrategy", paramService.getParamBySecondOrganize("ProductInterface","limitStrategy"));
this.addDict(model, "contentType", paramService.getParamBySecondOrganize("ProductInterface","contentType"));
this.addDict(model, "network", paramService.getParamBySecondOrganize("ProductInterface","network")); this.addDict(model, "network", paramService.getParamBySecondOrganize("ProductInterface","network"));
this.addDict(model, "interfaceTag", paramService.getParamBySecondOrganize("ProductInterface","interfaceTag")); this.addDict(model, "interfaceTag", paramService.getParamBySecondOrganize("ProductInterface","interfaceTag"));
this.addDict(model, "interfaceSource", paramService.getParamBySecondOrganize("ProductInterface","interfaceSource")); this.addDict(model, "interfaceSource", paramService.getParamBySecondOrganize("ProductInterface","interfaceSource"));
this.addDict(model, "inEncrypt", paramService.getParamBySecondOrganize("ProductApps","isEnable"));
this.addDict(model, "outEncrypt", paramService.getParamBySecondOrganize("ProductApps","isEnable"));
super.init(model, context); super.init(model, context);
} }
......
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