Commit daebc9b5 authored by “yiyousong”'s avatar “yiyousong”

feat: 区县接入接口调试

parent 2fabf91e
import request from "@/utils/request";
// 获取首页数据
export const getHomeData = (data) => {
return request({
url: `/bill/login/index`,
method: "post",
data,
});
};
...@@ -31,7 +31,9 @@ export default { ...@@ -31,7 +31,9 @@ export default {
children: "children", children: "children",
label: "label", label: "label",
}, },
siteId: storage.get(2, "siteId"), siteId: this.$route.params.siteId
? this.$route.params.siteId
: storage.get(2, "siteId"),
}; };
}, },
computed: { computed: {
......
...@@ -4,6 +4,11 @@ export function dateFormat(val) { ...@@ -4,6 +4,11 @@ export function dateFormat(val) {
return moment(val).format("YYYY-MM-DD HH:mm:ss"); return moment(val).format("YYYY-MM-DD HH:mm:ss");
} }
// 时间格式 年月日
export function dateDayFormat(val) {
return moment(val).format("YYYY-MM-DD");
}
// 时分秒 // 时分秒
export function times(val) { export function times(val) {
return moment(val).format("HH:mm:ss"); return moment(val).format("HH:mm:ss");
......
...@@ -221,7 +221,8 @@ export default { ...@@ -221,7 +221,8 @@ export default {
siteId: this.siteId, siteId: this.siteId,
...this.hallSearch, ...this.hallSearch,
...this.dateForm, ...this.dateForm,
hallNameList: ["不动产登记中心"], sectionNameNotList: [""],
groupList: ["year", "month", "day"],
}); });
console.log(res.data); console.log(res.data);
// this.hallSearch.total = res.data.total // this.hallSearch.total = res.data.total
......
...@@ -7,28 +7,7 @@ ...@@ -7,28 +7,7 @@
{{ v.meta.title }} {{ v.meta.title }}
</router-link> </router-link>
</div> </div>
<div> <div class="search-box"></div>
<el-form :model="form" inline ref="form">
<el-form-item>
<el-input></el-input>
</el-form-item>
<el-form-item>
<el-input></el-input>
</el-form-item>
<el-form-item>
<el-input></el-input>
</el-form-item>
<el-form-item>
<el-input></el-input>
</el-form-item>
<el-form-item>
<el-button>检索</el-button>
</el-form-item>
<el-form-item>
<el-button @click="$router.push('/engine')">返回</el-button>
</el-form-item>
</el-form>
</div>
</div> </div>
</template> </template>
...@@ -79,4 +58,10 @@ export default { ...@@ -79,4 +58,10 @@ export default {
font-weight: 600; font-weight: 600;
} }
} }
.search-box {
height: 68px;
width: 60%;
background: #fff;
border-radius: 34px;
}
</style> </style>
...@@ -4,12 +4,18 @@ ...@@ -4,12 +4,18 @@
<div class="flex h-full flex-col"> <div class="flex h-full flex-col">
<div class="mb-[53px] flex flex-col items-center"> <div class="mb-[53px] flex flex-col items-center">
<div class="title mb-[28px]">您好,欢迎使用数据仓库工作台</div> <div class="title mb-[28px]">您好,欢迎使用数据仓库工作台</div>
<div class="area-total">累计接入站点: 64个 (含区/县、镇/街道)</div> <div class="area-total">
累计接入站点: {{ homeData.totalAccessSite ?? 0 }}
(含区/县、镇/街道)
</div>
</div> </div>
<div class="data-total flex justify-center"> <div class="data-total flex justify-center">
<div class="name">累计汇聚数据:(条)</div> <div class="name">累计汇聚数据:(条)</div>
<div class="flex flex-col justify-center gap-4"> <div class="flex flex-col justify-center gap-4">
<el-statistic group-separator="," :value="8888867"></el-statistic> <el-statistic
group-separator=","
:value="homeData.totalCount"
></el-statistic>
<div class="text-[14px] text-[#424E65]"> <div class="text-[14px] text-[#424E65]">
数仓最近汇聚时间:2024-06-26 23:59:59 数仓最近汇聚时间:2024-06-26 23:59:59
</div> </div>
...@@ -56,7 +62,11 @@ ...@@ -56,7 +62,11 @@
<div class="flex w-full flex-col items-center"> <div class="flex w-full flex-col items-center">
<div class="main-title">对接站点矩阵</div> <div class="main-title">对接站点矩阵</div>
<div class="area-list grid w-full grid-cols-7 gap-5"> <div class="area-list grid w-full grid-cols-7 gap-5">
<AreaCard v-for="(v, i) in areaList" :key="i" :data="v"></AreaCard> <AreaCard
v-for="v in homeData.accessList"
:key="v.id"
:data="v"
></AreaCard>
</div> </div>
</div> </div>
</div> </div>
...@@ -66,6 +76,7 @@ ...@@ -66,6 +76,7 @@
<script> <script>
import LineEchart from "./components/LineEchart.vue"; import LineEchart from "./components/LineEchart.vue";
import AreaCard from "./components/AreaCard.vue"; import AreaCard from "./components/AreaCard.vue";
import { getHomeData } from "@/api/home";
export default { export default {
components: { components: {
LineEchart, LineEchart,
...@@ -174,8 +185,20 @@ export default { ...@@ -174,8 +185,20 @@ export default {
img: require("@/assets/img/sanjiangxinqu.png"), img: require("@/assets/img/sanjiangxinqu.png"),
}, },
], ],
homeData: {},
}; };
}, },
created() {
this.getHomeData();
},
methods: {
async getHomeData() {
let res = await getHomeData();
if (res.data.code == 1) {
this.homeData = res.data.data;
}
},
},
}; };
</script> </script>
......
...@@ -2,27 +2,25 @@ ...@@ -2,27 +2,25 @@
<div <div
:class="[ :class="[
'area-card', 'area-card',
data.systemList.length ? 'cursor-pointer' : 'cursor-not-allowed', 'is-hover',
{ 'is-hover': data.systemList.length }, tag.length ? 'cursor-pointer' : 'cursor-not-allowed',
]" ]"
@click="handleClick" @click="handleClick"
> >
<div class="banner"> <div class="banner">
<img class="banner-img" :src="data.img" /> <img class="banner-img" :src="data.bigPath" />
</div> </div>
<div class="content"> <div class="content">
<!-- 对接时间 --> <!-- 对接时间 -->
<div class="w-full"> <div class="w-full">
<span class="time" v-if="data.systemList.length"> <span class="time" v-if="tag.length">
对接时间:{{ data.date }} 对接时间:{{ data.createTime | dateDayFormat }}
</span> </span>
</div> </div>
<!-- name --> <!-- name -->
<span class="name">{{ data.name }}</span> <span class="name">{{ data.areaName }}</span>
<div class="flex gap-2" v-if="data.systemList.length"> <div class="flex gap-2" v-if="tag.length">
<span class="item" v-for="(v, i) in data.systemList" :key="i">{{ <span class="item" v-for="(v, i) in tag" :key="i">{{ v }}</span>
v
}}</span>
</div> </div>
<span class="item-2" v-else>等待对接</span> <span class="item-2" v-else>等待对接</span>
</div> </div>
...@@ -42,10 +40,25 @@ export default { ...@@ -42,10 +40,25 @@ export default {
data() { data() {
return {}; return {};
}, },
computed: {
tag() {
if (this.data.tag) {
return this.data.tag.split(",");
} else {
return [];
}
},
},
methods: { methods: {
handleClick() { handleClick() {
if (this.info.systemList.length) { if (this.tag.length) {
this.$emit("click", this.info); this.$emit("click", this.data);
this.$router.push({
name: "queueupreport",
params: {
siteId: this.data.siteId + "",
},
});
} }
}, },
}, },
......
...@@ -179,7 +179,9 @@ export default { ...@@ -179,7 +179,9 @@ export default {
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"), this.$moment().format("YYYY-MM-DD"),
], ],
siteId: storage.get(2, "siteId"), siteId: this.$route.params.siteId
? this.$route.params.siteId
: storage.get(2, "siteId"),
}, },
searchForm2: { searchForm2: {
wySignin: "", // 取号方式(现场取号,微信取号) wySignin: "", // 取号方式(现场取号,微信取号)
...@@ -387,8 +389,8 @@ export default { ...@@ -387,8 +389,8 @@ export default {
let obj = { let obj = {
page: this.current, page: this.current,
size: this.size, size: this.size,
// taketimeStart: this.searchForm.time[0], taketimeStart: this.searchForm.time[0],
// taketimeEnd: this.searchForm.time[1], taketimeEnd: this.searchForm.time[1],
siteId: this.searchForm.siteId, siteId: this.searchForm.siteId,
}; };
let val = `%${this.searchForm.keyword}%`; let val = `%${this.searchForm.keyword}%`;
......
...@@ -11,23 +11,13 @@ ...@@ -11,23 +11,13 @@
</div> </div>
<div slot="right"> <div slot="right">
<el-form ref="searchForm" :model="searchForm" inline> <el-form ref="searchForm" :model="searchForm" inline>
<el-form-item prop="type"> <el-form-item prop="areaName">
<el-select
size="small"
style="width: 150px"
v-model="searchForm.type"
>
<el-option label="按参数名称" value="name"></el-option>
<el-option label="按二级组织" value="secondOrganize"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="keyword">
<el-input <el-input
size="small" size="small"
v-model="searchForm.keyword" v-model="searchForm.areaName"
style="width: 200px" style="width: 200px"
class="ml10 mr10" class="ml10 mr10"
placeholder="请输入关键字搜索" placeholder="请输入区域名称搜索"
@keyup.native.enter="handleSearch" @keyup.native.enter="handleSearch"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -67,6 +57,7 @@ ...@@ -67,6 +57,7 @@
ref="AddAccess" ref="AddAccess"
:addVisible.sync="show" :addVisible.sync="show"
:title="title" :title="title"
@addSuccess="getAccessList"
></AddAccess> ></AddAccess>
</div> </div>
</template> </template>
...@@ -107,30 +98,38 @@ export default { ...@@ -107,30 +98,38 @@ export default {
}, },
{ {
label: "区域编码", label: "区域编码",
prop: "firstOrganize", prop: "areaCode",
align: "areaCode", align: "center",
}, },
{ {
label: "背景图片", label: "背景图片",
prop: "bigPath", prop: "bigPath",
align: "center", align: "center",
formatter: (row) => {
return (
<el-image
src={row.bigPath}
previewSrcList={[row.bigPath]}
class="w-[50px]"
/>
);
},
}, },
{ {
label: "区域接入系统", label: "区域接入系统",
align: "center", align: "center",
formatter: (row) => { formatter: (row) => {
if (row.accessSystemList.length) { if (row.tag) {
return row.accessSystemList.map((item) => { return row.tag.split(",").map((v) => {
return <el-tag type="info">{item.systemName}</el-tag>; return (
<el-tag type="info" class="mr-2">
{v}
</el-tag>
);
}); });
} }
}, },
}, },
{
label: "标签",
prop: "tag",
align: "center",
},
{ {
label: "排序", label: "排序",
prop: "sort", prop: "sort",
...@@ -167,8 +166,7 @@ export default { ...@@ -167,8 +166,7 @@ export default {
}, },
], ],
searchForm: { searchForm: {
type: "name", areaName: "",
keyword: "",
}, },
tableData: [], tableData: [],
current: 1, current: 1,
......
el-dialog
<template> <template>
<div> <div>
<el-dialog <el-dialog
...@@ -24,6 +23,29 @@ el-dialog ...@@ -24,6 +23,29 @@ el-dialog
@change="changeArea" @change="changeArea"
></InputTree> ></InputTree>
</el-form-item> </el-form-item>
<el-form-item label="系统标签" prop="tag">
<div class="flex gap-2">
<el-tag
v-for="(v, i) in form.tag"
:key="i"
closable
:disable-transitions="false"
@close="handleCloseTag(v)"
>
{{ v }}
</el-tag>
<el-input
v-if="inputVisible"
v-model="inputValue"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button v-else size="small" @click="showInput">+</el-button>
</div>
</el-form-item>
<el-form-item label="背景图片" prop="bigPath"> <el-form-item label="背景图片" prop="bigPath">
<el-upload <el-upload
name="file" name="file"
...@@ -99,6 +121,8 @@ export default { ...@@ -99,6 +121,8 @@ export default {
fileList: [], fileList: [],
preview: false, preview: false,
filepaths: [], filepaths: [],
inputVisible: false,
inputValue: "",
form: { form: {
areaName: "", areaName: "",
areaCode: "", areaCode: "",
...@@ -110,7 +134,7 @@ export default { ...@@ -110,7 +134,7 @@ export default {
longitude: "", longitude: "",
type: "", type: "",
bigPath: "", bigPath: "",
tag: "", tag: [],
sort: 99, sort: 99,
remark: "", remark: "",
icon: "", icon: "",
...@@ -143,7 +167,10 @@ export default { ...@@ -143,7 +167,10 @@ export default {
handleOk() { handleOk() {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
let res = await saveAccess(this.form); let res = await saveAccess({
...this.form,
tag: this.form.tag.join(","),
});
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
...@@ -161,15 +188,28 @@ export default { ...@@ -161,15 +188,28 @@ export default {
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
setTimeout(() => { setTimeout(() => {
if (row.tag) {
row.tag = row.tag.split(",");
}
if (row.bigPath) {
this.fileList = [
{
name: row.bigPath,
url: row.bigPath,
},
];
}
this.form = row; this.form = row;
}, 10); }, 10);
}, },
// 重置 // 重置
handleRest() { handleRest() {
this.fileList = [];
this.$resetForm("form"); this.$resetForm("form");
}, },
// 关闭 // 关闭
handleClose() { handleClose() {
this.fileList = [];
this.$resetForm("form"); this.$resetForm("form");
this.Visible = false; this.Visible = false;
}, },
...@@ -237,6 +277,33 @@ export default { ...@@ -237,6 +277,33 @@ export default {
this.filepaths = [file.url]; this.filepaths = [file.url];
this.preview = true; this.preview = true;
}, },
handleCloseTag(tag) {
this.form.tag.splice(this.form.tag.indexOf(tag), 1);
},
showInput() {
if (this.form.tag.length >= 2) {
this.$message.warning("暂时只能添加两个系统标签");
return;
}
this.inputVisible = true;
this.$nextTick(() => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue;
if (inputValue) {
if (this.form.tag.includes(inputValue)) {
this.$message.warning("已存在相同标签");
return;
}
this.form.tag.push(inputValue);
}
this.inputVisible = false;
this.inputValue = "";
},
}, },
}; };
</script> </script>
......
...@@ -99,6 +99,7 @@ const routes = [ ...@@ -99,6 +99,7 @@ const routes = [
{ {
path: "/market", path: "/market",
name: "market",
hideChildrenInMenu: true, hideChildrenInMenu: true,
component: () => import("@/pages/market/Market"), component: () => import("@/pages/market/Market"),
meta: { meta: {
...@@ -108,6 +109,7 @@ const routes = [ ...@@ -108,6 +109,7 @@ const routes = [
children: [ children: [
{ {
path: "/market/queueupreport", path: "/market/queueupreport",
name: "queueupreport",
hideChildrenInMenu: true, hideChildrenInMenu: true,
component: () => import("@/pages/market/QueueUpReport"), component: () => import("@/pages/market/QueueUpReport"),
meta: { meta: {
......
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