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