Commit 15017fd2 authored by “yiyousong”'s avatar “yiyousong”

perf: 格式化

parent 3eeb7834
......@@ -19,9 +19,7 @@
> -->
</div>
<!-- <div class="bullshit__headline">{{ message }}</div> -->
<div class="bullshit__info">
请检查您输入的网址是否正确,或点击下面的按钮返回。
</div>
<div class="bullshit__info">请检查您输入的网址是否正确,或点击下面的按钮返回。</div>
<a class="bullshit__return-home" @click="handleGoHome">返回</a>
</div>
</div>
......@@ -30,15 +28,15 @@
<script>
export default {
name: "Page404",
name: 'Page404',
data() {
return {};
},
methods: {
handleGoHome() {
this.$router.back();
},
},
}
}
};
</script>
......
......@@ -17,9 +17,7 @@
class="search-box top-radius flex h-full items-center gap-5"
v-hasPermi="['engine:query']"
>
<div class="text-[14px] text-[#395EBF]">
统计时段:{{ time[0] }}~{{ time[1] }}
</div>
<div class="text-[14px] text-[#395EBF]">统计时段:{{ time[0] }}~{{ time[1] }}</div>
<y-date-picker
v-model="time"
align="right"
......@@ -28,9 +26,7 @@
end-placeholder="结束日期"
>
</y-date-picker>
<el-button size="small" type="primary" @click="handleDate"
>搜索</el-button
>
<el-button size="small" type="primary" @click="handleDate">搜索</el-button>
</div>
<div
class="engine-btn top-radius"
......@@ -49,25 +45,22 @@
</template>
<script>
import { mapGetters } from "vuex";
import { mapGetters } from 'vuex';
export default {
data() {
return {
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
],
time: [this.$moment().format('YYYY-MM-DD'), this.$moment().format('YYYY-MM-DD')]
};
},
watch: {
"$route.path"() {
'$route.path'() {
this.$nextTick(() => {
this.handleDate();
});
},
}
},
computed: {
...mapGetters("user", ["secondaryRoutes"]),
...mapGetters('user', ['secondaryRoutes'])
},
created() {
this.$nextTick(() => {
......@@ -77,8 +70,8 @@ export default {
methods: {
handleDate() {
this.$refs.Page.getDate(this.time);
},
},
}
}
};
</script>
......@@ -133,11 +126,7 @@ export default {
.engine-btn {
width: 220px;
color: #fff;
background: linear-gradient(
270deg,
rgba(139, 87, 249, 1) 0%,
rgba(5, 149, 253, 1) 100%
);
background: linear-gradient(270deg, rgba(139, 87, 249, 1) 0%, rgba(5, 149, 253, 1) 100%);
font-size: 18px;
font-weight: bold;
display: flex;
......
This diff is collapsed.
......@@ -106,23 +106,23 @@
</template>
<script>
import DoubleTable from "./components/DoubleTable.vue";
import { getQueueSystemList } from "@/api/engine";
import { export2Excel } from "@/utils/exportExcel";
import { dataSection } from "@/utils";
import storage from "@/utils/storage";
import DoubleTable from './components/DoubleTable.vue';
import { getQueueSystemList } from '@/api/engine';
import { export2Excel } from '@/utils/exportExcel';
import { dataSection } from '@/utils';
import storage from '@/utils/storage';
export default {
components: {
DoubleTable,
DoubleTable
},
data() {
return {
dict: {},
dateForm: {
timeStart: this.$moment().format("YYYY-MM-DD"),
timeEnd: this.$moment().format("YYYY-MM-DD"),
timeStart: this.$moment().format('YYYY-MM-DD'),
timeEnd: this.$moment().format('YYYY-MM-DD')
},
siteId: storage.get(2, "siteId"),
siteId: storage.get(2, 'siteId'),
hallLoading: false,
businessLoading: false,
deptLoading: false,
......@@ -131,112 +131,112 @@ export default {
total: 0,
page: 1,
size: 10,
hallNameNotList: [""],
hallNameNotList: ['']
},
businessSearch: {
total: 0,
page: 1,
size: 10,
businessNotList: [""],
businessNotList: [''],
businessList: [],
groupList: ["business"],
groupList: ['business']
},
deptSearch: {
total: 0,
page: 1,
size: 10,
sectionNameNotList: [""],
sectionNameList: [],
sectionNameNotList: [''],
sectionNameList: []
},
windowSearch: {
total: 0,
page: 1,
size: 10,
windowFromnumNotList: [""],
windowFromnumList: [],
windowFromnumNotList: [''],
windowFromnumList: []
},
hallColumn: [
{
label: "大厅名称",
prop: "hallName",
align: "center",
showOverflowTooltip: true,
label: '大厅名称',
prop: 'hallName',
align: 'center',
showOverflowTooltip: true
},
{
label: "排队数量",
prop: "phCount",
align: "center",
label: '排队数量',
prop: 'phCount',
align: 'center',
formatter: (row, column, cellValue) => {
if (cellValue) {
return <span class="table-num">{cellValue}</span>;
}
},
},
}
}
],
businessColumn: [
{
label: "业务名称",
prop: "business",
align: "center",
label: '业务名称',
prop: 'business',
align: 'center',
showOverflowTooltip: true,
formatter: (row, column, cellValue) => {
if (cellValue) {
return <span>{cellValue}</span>;
}
},
}
},
{
label: "排队数量",
prop: "phCount",
align: "center",
label: '排队数量',
prop: 'phCount',
align: 'center',
formatter: (row, column, cellValue) => {
if (cellValue) {
return <span class="table-num">{cellValue}</span>;
}
},
},
}
}
],
deptColumn: [
{
label: "部门名称",
prop: "sectionName",
label: '部门名称',
prop: 'sectionName',
showOverflowTooltip: true,
align: "center",
align: 'center'
},
{
label: "排队数量",
prop: "phCount",
align: "center",
label: '排队数量',
prop: 'phCount',
align: 'center',
formatter: (row, column, cellValue) => {
if (cellValue) {
return <span class="table-num">{cellValue}</span>;
}
},
},
}
}
],
windowColumn: [
{
label: "窗口编号",
prop: "windowFromnum",
label: '窗口编号',
prop: 'windowFromnum',
showOverflowTooltip: true,
align: "center",
align: 'center'
},
{
label: "排队数量",
prop: "phCount",
align: "center",
label: '排队数量',
prop: 'phCount',
align: 'center',
formatter: (row, column, cellValue) => {
if (cellValue) {
return <span class="table-num">{cellValue}</span>;
}
},
},
}
}
],
hallTableData: [],
businessTableData: [],
deptTableData: [],
windowTableData: [],
windowTableData: []
};
},
created() {
......@@ -264,7 +264,7 @@ export default {
siteId: this.siteId,
...this.hallSearch,
...this.dateForm,
...form,
...form
});
if (res.data.code == 1) {
......@@ -272,13 +272,13 @@ export default {
return {
data: data,
total: total,
dict,
dict
};
} else {
return {
data: [],
total: 0,
dict: {},
dict: {}
};
}
},
......@@ -297,7 +297,7 @@ export default {
siteId: this.siteId,
...this.businessSearch,
...this.dateForm,
...form,
...form
});
if (res.data.code == 1) {
......@@ -305,13 +305,13 @@ export default {
return {
data,
total,
dict,
dict
};
} else {
return {
data: [],
total: 0,
dict: {},
dict: {}
};
}
},
......@@ -329,20 +329,20 @@ export default {
siteId: this.siteId,
...this.deptSearch,
...this.dateForm,
...form,
...form
});
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
return {
data,
total,
dict,
dict
};
} else {
return {
data: [],
total: 0,
dict: {},
dict: {}
};
}
},
......@@ -361,20 +361,20 @@ export default {
siteId: this.siteId,
...this.windowSearch,
...this.dateForm,
...form,
...form
});
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
return {
data,
total,
dict,
dict
};
} else {
return {
data: [],
total: 0,
dict: {},
dict: {}
};
}
},
......@@ -393,14 +393,14 @@ export default {
let filterVal = this.hallColumn.map((v) => v.prop);
dataSection(this.hallQueueFn, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
this.$message.warning('暂无数据');
return;
}
export2Excel(
tHeader,
filterVal,
data,
"大厅取号量统计报表" + this.$moment().format("YYYYMMDDHHmmss")
'大厅取号量统计报表' + this.$moment().format('YYYYMMDDHHmmss')
);
});
},
......@@ -415,14 +415,14 @@ export default {
}
dataSection(this.businessQueue, searchForm, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
this.$message.warning('暂无数据');
return;
}
export2Excel(
tHeader,
filterVal,
data,
"业务取号量统计报表" + this.$moment().format("YYYYMMDDHHmmss")
'业务取号量统计报表' + this.$moment().format('YYYYMMDDHHmmss')
);
});
},
......@@ -437,14 +437,14 @@ export default {
}
dataSection(this.deptQueue, searchForm, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
this.$message.warning('暂无数据');
return;
}
export2Excel(
tHeader,
filterVal,
data,
"部门取号量统计报表" + this.$moment().format("YYYYMMDDHHmmss")
'部门取号量统计报表' + this.$moment().format('YYYYMMDDHHmmss')
);
});
},
......@@ -459,14 +459,14 @@ export default {
}
dataSection(this.windowQueue, searchForm, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
this.$message.warning('暂无数据');
return;
}
export2Excel(
tHeader,
filterVal,
data,
"窗口取号量统计报表" + this.$moment().format("YYYYMMDDHHmmss")
'窗口取号量统计报表' + this.$moment().format('YYYYMMDDHHmmss')
);
});
},
......@@ -480,18 +480,18 @@ export default {
searchObj[listKey] = value ? [value] : [];
};
if (type === "business") {
setupSearch(this.businessSearch, "businessList", businessName);
if (type === 'business') {
setupSearch(this.businessSearch, 'businessList', businessName);
this.getBusinessQueue();
} else if (type === "dept") {
setupSearch(this.deptSearch, "sectionNameList", deptName);
} else if (type === 'dept') {
setupSearch(this.deptSearch, 'sectionNameList', deptName);
this.getDeptQueue();
} else if (type === "window") {
setupSearch(this.windowSearch, "windowFromnumList", windowNum);
} else if (type === 'window') {
setupSearch(this.windowSearch, 'windowFromnumList', windowNum);
this.getWindowQueue();
}
},
},
}
}
};
</script>
......
......@@ -45,86 +45,86 @@
</template>
<script>
import Search from "./components/Search.vue";
import TableHeader from "@/components/TableHeader.vue";
import { getEvaStatList } from "@/api/engine";
import { formatSeconds, dataSection } from "@/utils";
import { export2Excel } from "@/utils/exportExcel";
import storage from "@/utils/storage";
import Search from './components/Search.vue';
import TableHeader from '@/components/TableHeader.vue';
import { getEvaStatList } from '@/api/engine';
import { formatSeconds, dataSection } from '@/utils';
import { export2Excel } from '@/utils/exportExcel';
import storage from '@/utils/storage';
export default {
components: {
Search,
TableHeader,
TableHeader
},
data() {
return {
loading: false,
exportLoading: false,
siteId: storage.get(2, "siteId"),
siteId: storage.get(2, 'siteId'),
page: 1,
size: 10,
total: 0,
tableData: [],
column: [
{
label: "全选",
type: "selection",
width: "55",
align: "center",
reserveSelection: true,
label: '全选',
type: 'selection',
width: '55',
align: 'center',
reserveSelection: true
},
{
label: "序号",
type: "index",
width: "55",
align: "center",
label: '序号',
type: 'index',
width: '55',
align: 'center',
index: (index) => {
return (this.page - 1) * this.size + index + 1;
},
}
},
{
label: "站点名称",
prop: "siteName",
align: "center",
label: '站点名称',
prop: 'siteName',
align: 'center'
},
{
label: "部门名称",
prop: "sectionName",
align: "center",
label: '部门名称',
prop: 'sectionName',
align: 'center'
},
{
label: "评价选型",
prop: "pjOption",
align: "center",
label: '评价选型',
prop: 'pjOption',
align: 'center'
},
{
label: "窗口编号",
prop: "windowFromnum",
align: "center",
label: '窗口编号',
prop: 'windowFromnum',
align: 'center'
},
{
label: "年份",
prop: "year",
align: "center",
label: '年份',
prop: 'year',
align: 'center'
},
{
label: "月份",
prop: "month",
align: "center",
label: '月份',
prop: 'month',
align: 'center'
},
{
label: "日期",
prop: "day",
align: "center",
label: '日期',
prop: 'day',
align: 'center'
},
{
label: "评价数量",
prop: "pjCount",
align: "center",
},
label: '评价数量',
prop: 'pjCount',
align: 'center'
}
],
selectionRows: [],
searchForm: {
......@@ -135,11 +135,11 @@ export default {
pjOptionList: [],
sectionNameList: [],
windowFromnumList: [],
year: "",
month: "",
day: "",
year: '',
month: '',
day: ''
},
dict: {},
dict: {}
};
},
created() {
......@@ -153,20 +153,20 @@ export default {
size: this.size,
siteId: this.siteId,
...this.searchForm,
...form,
...form
});
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
return {
data,
total,
dict,
dict
};
} else {
return {
data: [],
total: 0,
dict: {},
dict: {}
};
}
},
......@@ -174,7 +174,7 @@ export default {
this.loading = true;
let { data, total, dict } = await this.evaStatList();
data.forEach((v) => {
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : "";
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : '';
});
this.total = total;
this.tableData = data;
......@@ -189,23 +189,22 @@ export default {
handleSearch(form) {
let { type, pjOption, deptName, windowNum, year, month, day } = form;
this.searchForm.year = "";
this.searchForm.month = "";
this.searchForm.day = "";
this.searchForm.year = '';
this.searchForm.month = '';
this.searchForm.day = '';
if (type === "year") {
this.searchForm.groupList = ["year"];
if (type === 'year') {
this.searchForm.groupList = ['year'];
this.searchForm.year = year;
} else if (type === "month") {
this.searchForm.groupList = ["year", "month"];
} else if (type === 'month') {
this.searchForm.groupList = ['year', 'month'];
if (month) {
[this.searchForm.year, this.searchForm.month] = month.split("-");
[this.searchForm.year, this.searchForm.month] = month.split('-');
}
} else {
this.searchForm.groupList = ["year", "month", "day"];
this.searchForm.groupList = ['year', 'month', 'day'];
if (day) {
[this.searchForm.year, this.searchForm.month, this.searchForm.day] =
day.split("-");
[this.searchForm.year, this.searchForm.month, this.searchForm.day] = day.split('-');
}
}
......@@ -229,28 +228,28 @@ export default {
tHeader,
filterVal,
data,
"排队数据汇总报表" + this.$moment().format("YYYYMMDDHHmmss")
'排队数据汇总报表' + this.$moment().format('YYYYMMDDHHmmss')
);
} else {
dataSection(this.queueStatList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
this.$message.warning('暂无数据');
return;
}
data.forEach((v) => {
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : "";
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : '';
});
export2Excel(
tHeader,
filterVal,
data,
"排队数据汇总报表" + this.$moment().format("YYYYMMDDHHmmss")
'排队数据汇总报表' + this.$moment().format('YYYYMMDDHHmmss')
);
});
}
this.exportLoading = false;
},
},
}
}
};
</script>
......
......@@ -45,22 +45,22 @@
</template>
<script>
import Search from "./components/Search.vue";
import TableHeader from "@/components/TableHeader.vue";
import { getQueueStatList } from "@/api/engine";
import { formatSeconds, dataSection } from "@/utils";
import { export2Excel } from "@/utils/exportExcel";
import storage from "@/utils/storage";
import Search from './components/Search.vue';
import TableHeader from '@/components/TableHeader.vue';
import { getQueueStatList } from '@/api/engine';
import { formatSeconds, dataSection } from '@/utils';
import { export2Excel } from '@/utils/exportExcel';
import storage from '@/utils/storage';
export default {
components: {
Search,
TableHeader,
TableHeader
},
data() {
return {
loading: false,
exportLoading: false,
siteId: storage.get(2, "siteId"),
siteId: storage.get(2, 'siteId'),
dict: {},
page: 1,
size: 10,
......@@ -68,68 +68,68 @@ export default {
tableData: [],
column: [
{
label: "全选",
type: "selection",
width: "55",
align: "center",
reserveSelection: true,
label: '全选',
type: 'selection',
width: '55',
align: 'center',
reserveSelection: true
},
{
label: "序号",
type: "index",
width: "55",
align: "center",
label: '序号',
type: 'index',
width: '55',
align: 'center',
index: (index) => {
return (this.page - 1) * this.size + index + 1;
},
}
},
{
label: "站点名称",
prop: "siteName",
align: "center",
label: '站点名称',
prop: 'siteName',
align: 'center'
},
{
label: "业务名称",
prop: "business",
align: "center",
label: '业务名称',
prop: 'business',
align: 'center'
},
{
label: "部门名称",
prop: "sectionName",
align: "center",
label: '部门名称',
prop: 'sectionName',
align: 'center'
},
{
label: "窗口编号",
prop: "windowFromnum",
align: "center",
label: '窗口编号',
prop: 'windowFromnum',
align: 'center'
},
{
label: "年份",
prop: "year",
align: "center",
label: '年份',
prop: 'year',
align: 'center'
},
{
label: "月份",
prop: "month",
align: "center",
label: '月份',
prop: 'month',
align: 'center'
},
{
label: "日期",
prop: "day",
align: "center",
label: '日期',
prop: 'day',
align: 'center'
},
{
label: "办理量",
prop: "phCount",
align: "center",
label: '办理量',
prop: 'phCount',
align: 'center'
},
{
label: "平均等待时长",
prop: "waitTime",
align: "center",
},
label: '平均等待时长',
prop: 'waitTime',
align: 'center'
}
],
selectionRows: [],
searchForm: {
......@@ -140,10 +140,10 @@ export default {
businessList: [],
sectionNameList: [],
windowFromnumList: [],
year: "",
month: "",
day: "",
},
year: '',
month: '',
day: ''
}
};
},
created() {
......@@ -157,20 +157,20 @@ export default {
size: this.size,
siteId: this.siteId,
...this.searchForm,
...form,
...form
});
if (res.data.code == 1) {
let { data, total, dict } = res.data.data;
return {
data,
total,
dict,
dict
};
} else {
return {
data: [],
total: 0,
dict: {},
dict: {}
};
}
},
......@@ -178,7 +178,7 @@ export default {
this.loading = true;
let { data, total, dict } = await this.queueStatList();
data.forEach((v) => {
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : "";
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : '';
});
this.dict = dict;
this.total = total;
......@@ -191,22 +191,21 @@ export default {
},
handleSearch(form) {
let { type, businessName, deptName, windowNum, year, month, day } = form;
this.searchForm.year = "";
this.searchForm.month = "";
this.searchForm.day = "";
if (type == "year") {
this.searchForm.groupList = ["year"];
this.searchForm.year = '';
this.searchForm.month = '';
this.searchForm.day = '';
if (type == 'year') {
this.searchForm.groupList = ['year'];
this.searchForm.year = year;
} else if (type == "month") {
this.searchForm.groupList = ["year", "month"];
} else if (type == 'month') {
this.searchForm.groupList = ['year', 'month'];
if (month) {
[this.searchForm.year, this.searchForm.month] = month.split("-");
[this.searchForm.year, this.searchForm.month] = month.split('-');
}
} else {
this.searchForm.groupList = ["year", "month", "day"];
this.searchForm.groupList = ['year', 'month', 'day'];
if (day) {
[this.searchForm.year, this.searchForm.month, this.searchForm.day] =
day.split("-");
[this.searchForm.year, this.searchForm.month, this.searchForm.day] = day.split('-');
}
}
this.searchForm.businessList = businessName ? [businessName] : [];
......@@ -228,28 +227,28 @@ export default {
tHeader,
filterVal,
data,
"排队数据汇总报表" + this.$moment().format("YYYYMMDDHHmmss")
'排队数据汇总报表' + this.$moment().format('YYYYMMDDHHmmss')
);
} else {
dataSection(this.queueStatList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
this.$message.warning('暂无数据');
return;
}
data.forEach((v) => {
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : "";
v.waitTime = v.waitTime ? formatSeconds(v.waitTime) : '';
});
export2Excel(
tHeader,
filterVal,
data,
"排队数据汇总报表" + this.$moment().format("YYYYMMDDHHmmss")
'排队数据汇总报表' + this.$moment().format('YYYYMMDDHHmmss')
);
});
}
this.exportLoading = false;
},
},
}
}
};
</script>
......
<template>
<div
class="search mb-[15px] flex h-[170px] w-full flex-col items-center justify-around"
>
<div class="search mb-[15px] flex h-[170px] w-full flex-col items-center justify-around">
<div class="flex gap-10">
<router-link v-for="(v, i) in subMenus" :key="i" :to="v.path">
{{ v.meta.title }}
......@@ -12,11 +10,7 @@
<div class="flex gap-2">
<div class="item border">
<span class="pl-[15px] text-[14px]">选择时间</span>
<el-popover
trigger="click"
placement="bottom-start"
popper-class="search-popover"
>
<el-popover trigger="click" placement="bottom-start" popper-class="search-popover">
<div class="flex flex-col items-center">
<div class="tab-box">
<div
......@@ -75,10 +69,7 @@
></el-input>
</el-popover>
</div>
<div
class="item border"
v-if="$route.path == '/enginesearch/queueupdata'"
>
<div class="item border" v-if="$route.path == '/enginesearch/queueupdata'">
<span class="pl-[15px] text-[14px]">选择业务</span>
<el-popover
trigger="click"
......@@ -103,13 +94,8 @@
</div>
</div>
</div>
<div
v-else
class="flex h-full w-full items-center justify-center"
>
<el-empty
:image="require('@/assets/img/empty.png')"
></el-empty>
<div v-else class="flex h-full w-full items-center justify-center">
<el-empty :image="require('@/assets/img/empty.png')"></el-empty>
</div>
</div>
<el-input
......@@ -131,12 +117,7 @@
filterable
size="small"
>
<el-option
v-for="(v, i) in pjOption"
:key="i"
:label="v"
:value="v"
></el-option>
<el-option v-for="(v, i) in pjOption" :key="i" :label="v" :value="v"></el-option>
</el-select>
</div>
<div class="item border">
......@@ -164,13 +145,8 @@
</div>
</div>
</div>
<div
v-else
class="flex h-full w-full items-center justify-center"
>
<el-empty
:image="require('@/assets/img/empty.png')"
></el-empty>
<div v-else class="flex h-full w-full items-center justify-center">
<el-empty :image="require('@/assets/img/empty.png')"></el-empty>
</div>
</div>
<el-input
......@@ -210,13 +186,8 @@
</div>
</div>
</div>
<div
v-else
class="flex h-full w-full items-center justify-center"
>
<el-empty
:image="require('@/assets/img/empty.png')"
></el-empty>
<div v-else class="flex h-full w-full items-center justify-center">
<el-empty :image="require('@/assets/img/empty.png')"></el-empty>
</div>
</div>
<el-input
......@@ -238,14 +209,14 @@
</template>
<script>
import { findBottomSubarrays } from "@/utils";
import { findBottomSubarrays } from '@/utils';
export default {
components: {},
props: {
dict: {
required: true,
default: () => {},
},
default: () => {}
}
},
data() {
return {
......@@ -258,15 +229,15 @@ export default {
sectionList: [],
windowList: [],
form: {
type: "year",
businessName: "",
deptName: "",
windowNum: "",
year: "",
month: "",
day: "",
pjOption: "",
},
type: 'year',
businessName: '',
deptName: '',
windowNum: '',
year: '',
month: '',
day: '',
pjOption: ''
}
};
},
computed: {
......@@ -274,9 +245,9 @@ export default {
return this.$route.path;
},
dateInputVal() {
if (this.form.type == "year") {
if (this.form.type == 'year') {
return this.form.year;
} else if (this.form.type == "month") {
} else if (this.form.type == 'month') {
return this.form.month;
} else {
return this.form.day;
......@@ -288,7 +259,7 @@ export default {
},
set(val) {
this.calcBusiness = val;
},
}
},
calcDeptList: {
get() {
......@@ -296,7 +267,7 @@ export default {
},
set(val) {
this.calcDept = val;
},
}
},
calcWindowList: {
get() {
......@@ -304,8 +275,8 @@ export default {
},
set(val) {
this.calcWindow = val;
},
},
}
}
},
watch: {
dict: {
......@@ -313,8 +284,8 @@ export default {
this.changeOptions(newVal);
},
deep: true,
immediate: true,
},
immediate: true
}
},
created() {
this.getSubMenus();
......@@ -327,14 +298,10 @@ export default {
// 获取当前顶层路由下的所有子路由
getSubMenus() {
let path = this.$route?.meta.parentPath
? this.$route.meta.parentPath
: this.$route.path;
let path = this.$route?.meta.parentPath ? this.$route.meta.parentPath : this.$route.path;
let options = this.$router.options.routes[0].children;
let curRouters = options.filter((v) => v.path == path);
this.subMenus = findBottomSubarrays(curRouters).filter(
(v) => !v.meta.hidden
);
this.subMenus = findBottomSubarrays(curRouters).filter((v) => !v.meta.hidden);
},
getTopKeyList(arr) {
......@@ -343,33 +310,29 @@ export default {
// 获取搜索配置
changeOptions(dict) {
if (JSON.stringify(dict) == "{}") return;
if (JSON.stringify(dict) == '{}') return;
let { businessList, sectionNameList, windowFromnumList, pjOption } = dict;
this.pjOption = pjOption ? pjOption : [];
this.calcBusiness = this.businessList = businessList
? this.getTopKeyList(businessList)
: [];
this.calcDept = this.sectionList = sectionNameList
? this.getTopKeyList(sectionNameList)
: [];
this.calcBusiness = this.businessList = businessList ? this.getTopKeyList(businessList) : [];
this.calcDept = this.sectionList = sectionNameList ? this.getTopKeyList(sectionNameList) : [];
this.calcWindow = this.windowList = windowFromnumList
? this.getTopKeyList(windowFromnumList)
: [];
},
changeTab(key) {
this.form.year = "";
this.form.month = "";
this.form.day = "";
this.form.year = '';
this.form.month = '';
this.form.day = '';
this.form.type = key;
},
handleClearDate() {
this.form.year = "";
this.form.month = "";
this.form.day = "";
this.form.year = '';
this.form.month = '';
this.form.day = '';
},
handleBusinessNameInput(name) {
if (name != "") {
if (name != '') {
let list = this.businessList.filter((v) => v.includes(name));
this.calcBusinessList = list.slice(0, 10);
} else {
......@@ -377,7 +340,7 @@ export default {
}
},
handleDeptNameInput(name) {
if (name != "") {
if (name != '') {
let list = this.deptList.filter((v) => v.includes(name));
this.calcDeptList = list.slice(0, 10);
} else {
......@@ -385,7 +348,7 @@ export default {
}
},
handleWindowInput(value) {
if (value != "") {
if (value != '') {
let list = this.windowList.filter((v) => v.includes(value));
this.calcWindowList = list.slice(0, 10);
} else {
......@@ -393,29 +356,28 @@ export default {
}
},
handleSearch() {
this.$emit("search", this.form);
this.$emit('search', this.form);
},
handleShowPopper(type) {
switch (type) {
case "business":
case 'business':
this.calcBusinessList = this.businessList.slice(0, 10);
break;
case "deptName":
case 'deptName':
this.calcDeptList = this.sectionList.slice(0, 10);
break;
case "window":
case 'window':
this.calcWindowList = this.windowList.slice(0, 10);
}
},
},
}
}
};
</script>
<style lang="less" scoped>
.search {
flex-shrink: 0;
background: url("@/assets/img/engineSearch_bg.svg") no-repeat center / 100%
100%;
background: url('@/assets/img/engineSearch_bg.svg') no-repeat center / 100% 100%;
a {
color: rgba(254, 254, 254, 0.65);
}
......
<template>
<div
:class="[
'area-card',
'is-hover',
tag.length ? 'cursor-pointer' : 'cursor-not-allowed',
]"
:class="['area-card', 'is-hover', tag.length ? 'cursor-pointer' : 'cursor-not-allowed']"
@click="handleClick"
>
<div class="banner">
......@@ -14,9 +10,7 @@
<!-- 对接时间 -->
<div class="w-full">
<span class="time" v-if="isAccess">
对接时间:<span v-if="data.accessTime">{{
data.accessTime | dateDayFormat
}}</span>
对接时间:<span v-if="data.accessTime">{{ data.accessTime | dateDayFormat }}</span>
</span>
</div>
<!-- name -->
......@@ -36,8 +30,8 @@ export default {
type: Object,
default() {
return {};
},
},
}
}
},
data() {
return {};
......@@ -45,7 +39,7 @@ export default {
computed: {
tag() {
if (this.data.tag) {
return this.data.tag.split(",");
return this.data.tag.split(',');
} else {
return [];
}
......@@ -58,21 +52,21 @@ export default {
} else {
return false;
}
},
}
},
methods: {
handleClick() {
if (this.tag.length) {
this.$emit("click", this.data);
this.$emit('click', this.data);
this.$router.push({
name: "queueupreport",
name: 'queueupreport',
params: {
siteId: this.data.siteId + "",
},
siteId: this.data.siteId + ''
}
});
}
},
},
}
}
};
</script>
......
<template>
<div
:class="[
'card',
info.systemList.length ? 'cursor-pointer' : 'cursor-not-allowed',
]"
:class="['card', info.systemList.length ? 'cursor-pointer' : 'cursor-not-allowed']"
@click="handleClick"
>
<div>{{ info.name }}</div>
<el-tag
size="small"
type="danger"
color="#fff"
v-if="!info.systemList.length"
>
<el-tag size="small" type="danger" color="#fff" v-if="!info.systemList.length">
<i class="el-icon-link"></i>
等待对接</el-tag
>
<div class="cur flex gap-2" v-else>
<el-tag v-for="(v, i) in info.systemList" :key="i" size="small">{{
v
}}</el-tag>
</div>
<div class="card-date" v-if="info.systemList.length">
对接时间:{{ info.date }}
<el-tag v-for="(v, i) in info.systemList" :key="i" size="small">{{ v }}</el-tag>
</div>
<div class="card-date" v-if="info.systemList.length">对接时间:{{ info.date }}</div>
<div class="mask" v-else></div>
</div>
</template>
......@@ -35,8 +23,8 @@ export default {
type: Object,
default() {
return {};
},
},
}
}
},
data() {
return {};
......@@ -44,10 +32,10 @@ export default {
methods: {
handleClick() {
if (this.info.systemList.length) {
this.$emit("click", this.info);
this.$emit('click', this.info);
}
},
},
}
}
};
</script>
......@@ -56,7 +44,7 @@ export default {
width: 100%;
height: 100%;
color: #fff;
background: url("@/assets/img/changningxian.png") no-repeat center / 100% 100%;
background: url('@/assets/img/changningxian.png') no-repeat center / 100% 100%;
border-radius: 4px;
color: #fff;
position: relative;
......
......@@ -2,37 +2,32 @@
<div class="carousel">
<div class="swiper-container">
<div class="swiper-wrapper">
<img
class="swiper-slide"
v-for="(v, index) in ImageArray"
:key="index"
:src="v"
/>
<img class="swiper-slide" v-for="(v, index) in ImageArray" :key="index" :src="v" />
</div>
</div>
</div>
</template>
<script>
import Swiper from "swiper";
import Swiper from 'swiper';
export default {
props: {
ImageArray: {
type: Array,
default: () => {
return [];
},
}
},
speed: {
type: Number,
default: 1500,
},
default: 1500
}
},
data() {
return {
currentIndex: 0,
timer: null,
mySwiper: null,
mySwiper: null
};
},
watch: {},
......@@ -41,22 +36,22 @@ export default {
},
methods: {
initSwiper() {
this.mySwiper = new Swiper(".swiper-container", {
this.mySwiper = new Swiper('.swiper-container', {
autoplay: true,
effect: "fade",
effect: 'fade',
fadeEffect: true,
speed: this.speed,
loop: true,
updateOnWindowResize: true,
watchSlidesProgress: true,
watchSlidesProgress: true
});
this.mySwiper.init();
},
}
},
beforeDestroy() {
this.mySwiper.destroy();
},
}
};
</script>
......
......@@ -7,21 +7,21 @@ export default {
props: {
dataset: {
type: Object,
default: () => {},
default: () => {}
},
endValue: {
type: Number,
default: 10,
default: 10
},
color: {
type: String,
default: "#0857E8",
},
default: '#0857E8'
}
},
data() {
return {
myChart: null,
timer: null,
timer: null
};
},
watch: {
......@@ -32,8 +32,8 @@ export default {
});
},
deep: true,
immediate: true,
},
immediate: true
}
},
mounted() {},
methods: {
......@@ -52,13 +52,13 @@ export default {
let option = {
grid: {
top: "15%",
left: "15%",
right: "5%",
bottom: "12%",
top: '15%',
left: '15%',
right: '5%',
bottom: '12%'
},
tooltip: {
trigger: "axis",
trigger: 'axis',
borderWidth: 0,
formatter: (params) => {
return `${
......@@ -66,12 +66,10 @@ export default {
}<br/><div style='margin-top:4px;padding:4px 8px;background:${this.hexToRgba(
this.color,
0.1
)};color:${
this.color
};border-radius:4px'><span style='margin-right:20px'>${
)};color:${this.color};border-radius:4px'><span style='margin-right:20px'>${
params[0].seriesName
}</span>${params[0].value.value}</div>`;
},
}
},
// dataZoom: [
// {
......@@ -82,77 +80,77 @@ export default {
// },
// ],
xAxis: {
type: "category",
type: 'category',
boundaryGap: false,
axisLabel: {
color: "#5A5C60",
color: '#5A5C60',
formatter: (name) => {
let formatterName = name.split("-");
let formatterName = name.split('-');
return `${formatterName[1]}-${formatterName[2]}`;
},
}
},
axisLine: {
show: true,
lineStyle: {
color: "#E0E0E0",
},
color: '#E0E0E0'
}
},
axisTick: {
show: false,
show: false
},
splitLine: {
show: true,
lineStyle: {
type: "dashed",
color: "#E0E0E0",
},
type: 'dashed',
color: '#E0E0E0'
}
},
axisPointer: {
lineStyle: {
color: this.hexToRgba(this.color, 1),
},
},
color: this.hexToRgba(this.color, 1)
}
}
},
yAxis: {
type: "value",
type: 'value',
splitNumber: 3,
axisLabel: {
color: "#666",
color: '#666'
},
nameTextStyle: {
color: "#5A5C60",
color: '#5A5C60',
fontSize: 12,
lineHeight: 40,
lineHeight: 40
},
splitLine: {
lineStyle: {
type: "dashed",
color: "#E0E0E0",
},
type: 'dashed',
color: '#E0E0E0'
}
},
axisLine: {
show: false,
show: false
},
axisTick: {
show: false,
},
show: false
}
},
series: [
{
name: "数据量",
type: "line",
name: '数据量',
type: 'line',
smooth: true,
showSymbol: false,
symbolSize: 8,
lineStyle: {
color: this.hexToRgba(this.color, 1),
color: this.hexToRgba(this.color, 1)
},
itemStyle: {
color: this.hexToRgba(this.color, 1),
color: this.hexToRgba(this.color, 1)
},
areaStyle: {
color: {
type: "linear",
type: 'linear',
x: 0,
y: 0,
x2: 0,
......@@ -160,28 +158,28 @@ export default {
colorStops: [
{
offset: 0,
color: this.hexToRgba(this.color, 0.4),
color: this.hexToRgba(this.color, 0.4)
},
{
offset: 0.6,
color: this.hexToRgba(this.color, 0.1),
color: this.hexToRgba(this.color, 0.1)
},
{
offset: 1,
color: "#0000",
},
],
},
},
},
color: '#0000'
}
]
}
}
}
],
dataset,
dataset
};
this.myChart.setOption(option);
// 适配
window.addEventListener("resize", this.adapterEcharts);
window.addEventListener('resize', this.adapterEcharts);
// 清除现有定时器,防止多次调用
// clearInterval(this.timer);
......@@ -221,20 +219,20 @@ export default {
},
hexToRgba(hex, opacity) {
let rgbaColor = "";
let rgbaColor = '';
let reg = /^#[\da-f]{6}$/i;
if (reg.test(hex)) {
rgbaColor = `rgba(${parseInt("0x" + hex.slice(1, 3))},${parseInt(
"0x" + hex.slice(3, 5)
)},${parseInt("0x" + hex.slice(5, 7))},${opacity})`;
rgbaColor = `rgba(${parseInt('0x' + hex.slice(1, 3))},${parseInt(
'0x' + hex.slice(3, 5)
)},${parseInt('0x' + hex.slice(5, 7))},${opacity})`;
}
return rgbaColor;
},
}
},
beforeDestroy() {
window.removeEventListener("resize", this.adapterEcharts);
window.removeEventListener('resize', this.adapterEcharts);
clearInterval(this.timer);
},
}
};
</script>
......
......@@ -3,13 +3,7 @@
<div class="page page-login flex h-full w-full items-center justify-center">
<div class="flex min-w-[450px] flex-col justify-center bg-white p-[25px]">
<h1 class="mb-4 text-center text-[24px] font-[500]">{{ systemName }}</h1>
<el-form
class="w-full"
ref="form"
:model="form"
:rules="rules"
hide-required-asterisk
>
<el-form class="w-full" ref="form" :model="form" :rules="rules" hide-required-asterisk>
<el-form-item l prop="loginName">
<el-input
clearable
......@@ -38,14 +32,8 @@
v-model="form.securityCode"
@keyup.enter="onSubmit"
></el-input>
<div
class="code-box h-[40px] cursor-pointer overflow-hidden rounded-[4px]"
>
<img
class="h-full w-full"
:src="securityUrl"
@click="createCode"
/>
<div class="code-box h-[40px] cursor-pointer overflow-hidden rounded-[4px]">
<img class="h-full w-full" :src="securityUrl" @click="createCode" />
</div>
</div>
</el-form-item>
......@@ -67,52 +55,48 @@
</template>
<script>
import storage from "@/utils/storage";
import { mapMutations } from "vuex";
import { getHomeData } from "@/api/home";
import { generateRoutes, filterBtn } from "@/utils";
import { calcMenu } from "@/router";
import { login } from "@/api/login";
import { systemName } from "@/config";
import storage from '@/utils/storage';
import { mapMutations } from 'vuex';
import { getHomeData } from '@/api/home';
import { generateRoutes, filterBtn } from '@/utils';
import { calcMenu } from '@/router';
import { login } from '@/api/login';
import { systemName } from '@/config';
export default {
name: "login",
name: 'login',
data() {
return {
systemName,
api: process.env.VUE_APP_API_BASE_URL,
securityUrl: "",
securityUrl: '',
originData: [],
loading: false,
redirect: this.$route.query.redirect || "/",
redirect: this.$route.query.redirect || '/',
form: {
loginName: "",
password: "",
securityCode: "",
loginName: '',
password: '',
securityCode: ''
},
rules: {
loginName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
securityCode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
],
},
loginName: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
securityCode: [{ required: true, message: '请输入验证码', trigger: 'blur' }]
}
};
},
created() {
this.createCode();
},
methods: {
...mapMutations("user", [
"SET_token",
"SET_sysName",
"SET_sysLogo",
"SET_path",
"SET_userInfo",
"SET_permissions",
"SET_routes",
"SET_menusList",
...mapMutations('user', [
'SET_token',
'SET_sysName',
'SET_sysLogo',
'SET_path',
'SET_userInfo',
'SET_permissions',
'SET_routes',
'SET_menusList'
]),
// 获取验证码
......@@ -120,8 +104,7 @@ export default {
// 加时间戳印记用于刷新gif
let mark = new Date().getTime();
// this.form.mark = mark;
this.securityUrl =
this.api + "/bill/securitycode/createCode" + `?mark=${mark}`;
this.securityUrl = this.api + '/bill/securitycode/createCode' + `?mark=${mark}`;
},
onSubmit() {
......@@ -132,17 +115,17 @@ export default {
if (res.data.code == 1) {
let {
token,
user: { id, loginName, siteIds },
user: { id, loginName, siteIds }
} = res.data.data;
let form = {
token,
userInfo: {
id,
name: loginName,
},
name: loginName
}
};
if (siteIds) {
let siteid = siteIds.split(",")[0];
let siteid = siteIds.split(',')[0];
form.siteid = siteid;
}
await this.getToken(form);
......@@ -157,11 +140,11 @@ export default {
if (token && userInfo) {
this.SET_userInfo(userInfo);
this.SET_token(token);
storage.set(2, "siteId", siteid);
storage.set(2, 'siteId', siteid);
// storage.set(2, "siteName", siteName);
await this.getIndixData();
} else {
this.$message.warning("登录失败,请稍后再试");
this.$message.warning('登录失败,请稍后再试');
}
},
// 获取菜单列表
......@@ -180,7 +163,7 @@ export default {
let path = routes[0].path;
this.$router.push(path);
} else {
this.$message.warning("暂无权限,请联系管理员!");
this.$message.warning('暂无权限,请联系管理员!');
}
}
},
......@@ -191,8 +174,8 @@ export default {
.filter((v) => v.perms)
.map((v) => v.perms);
this.SET_permissions(btnPermissions);
},
},
}
}
};
</script>
......
This diff is collapsed.
<template>
<div class="flex h-full w-full gap-5">
<div
class="area-tree-box flex h-full w-[20%] flex-col rounded-[4px] bg-white"
>
<div class="area-tree-box flex h-full w-[20%] flex-col rounded-[4px] bg-white">
<TabHeader icon="el-icon-notebook-2" label="组织架构"></TabHeader>
<div class="w-full flex-1 overflow-auto p-[20px]">
<AreaTree @change="changeSite"></AreaTree>
......@@ -12,10 +10,7 @@
<el-tabs :value="activeKey" @tab-click="changeRouter">
<el-tab-pane v-for="v in secondaryRoutes" :key="v.path" :name="v.path">
<template slot="label">
<i
v-if="v.meta.icon"
:class="['mr-[5px]', 'primary', v.meta.icon]"
></i>
<i v-if="v.meta.icon" :class="['mr-[5px]', 'primary', v.meta.icon]"></i>
<span class="tab-label">{{ v.meta.title }}</span>
</template>
</el-tab-pane>
......@@ -28,18 +23,18 @@
</template>
<script>
import { mapGetters } from "vuex";
import { mapGetters } from 'vuex';
export default {
data() {
return {
curTreeData: {}, // 当前选择的站点
curTreeData: {} // 当前选择的站点
};
},
computed: {
...mapGetters("user", ["secondaryRoutes"]),
...mapGetters('user', ['secondaryRoutes']),
activeKey() {
return this.$route.path;
},
}
},
created() {},
methods: {
......@@ -51,8 +46,8 @@ export default {
changeSite(data) {
this.curTreeData = data;
// this.$refs.Page.getSite(data);
},
},
}
}
};
</script>
......
This diff is collapsed.
<template>
<el-drawer
title="详情"
:visible.sync="drawer"
size="60%"
@close="drawer = false"
>
<el-drawer title="详情" :visible.sync="drawer" size="60%" @close="drawer = false">
<div class="main h-full w-full p-[20px]">
<el-descriptions
:column="3"
border
size="medium"
labelClassName="label-name"
>
<el-descriptions :column="3" border size="medium" labelClassName="label-name">
<template v-for="(v, i) in dataInfo">
<el-descriptions-item
v-if="
(v.prop == 'photoautograph' || v.prop == 'picture') && v.content
"
v-if="(v.prop == 'photoautograph' || v.prop == 'picture') && v.content"
:key="i"
:label="v.title"
>
<el-image
style="width: 50px"
:src="v.content"
:preview-src-list="[v.content]"
>
<el-image style="width: 50px" :src="v.content" :preview-src-list="[v.content]">
</el-image>
</el-descriptions-item>
<el-descriptions-item v-else :key="i" :label="v.title">
......@@ -41,168 +25,168 @@ export default {
props: {
show: {
type: Boolean,
default: false,
default: false
},
info: {
required: true,
type: Object,
default: () => {},
},
default: () => {}
}
},
data() {
return {
detailsList: [
{
title: "身份证号",
prop: "peopleIdcard",
content: "",
title: '身份证号',
prop: 'peopleIdcard',
content: ''
},
{
title: "姓名",
prop: "peopleName",
content: "",
title: '姓名',
prop: 'peopleName',
content: ''
},
{
title: "性别",
prop: "peopleSex",
content: "",
title: '性别',
prop: 'peopleSex',
content: ''
},
{
title: "手机号",
prop: "peoplePhone",
content: "",
title: '手机号',
prop: 'peoplePhone',
content: ''
},
{
title: "评价选项",
prop: "pjOption",
content: "",
title: '评价选项',
prop: 'pjOption',
content: ''
},
{
title: "评价标签",
prop: "contentTag",
content: "",
title: '评价标签',
prop: 'contentTag',
content: ''
},
{
title: "评价人图片地址",
prop: "picUrl",
content: "",
title: '评价人图片地址',
prop: 'picUrl',
content: ''
},
{
title: "部门",
prop: "sectionName",
content: "",
title: '部门',
prop: 'sectionName',
content: ''
},
{
title: "大厅名称",
prop: "hallName",
content: "",
title: '大厅名称',
prop: 'hallName',
content: ''
},
{
title: "评价来源",
prop: "pjSource",
content: "",
title: '评价来源',
prop: 'pjSource',
content: ''
},
{
title: "手输意见",
prop: "opinion",
content: "",
title: '手输意见',
prop: 'opinion',
content: ''
},
{
title: "窗口名称",
prop: "windowName",
content: "",
title: '窗口名称',
prop: 'windowName',
content: ''
},
{
title: "窗口编号",
prop: "windowFromnum",
content: "",
title: '窗口编号',
prop: 'windowFromnum',
content: ''
},
{
title: "排队编号",
prop: "flounum",
content: "",
title: '排队编号',
prop: 'flounum',
content: ''
},
{
title: "窗口评价",
prop: "pjxt",
content: "",
title: '窗口评价',
prop: 'pjxt',
content: ''
},
{
title: "工作人员姓名",
prop: "workmanName",
content: "",
title: '工作人员姓名',
prop: 'workmanName',
content: ''
},
{
title: "工作人员工号",
prop: "workmanNumber",
content: "",
title: '工作人员工号',
prop: 'workmanNumber',
content: ''
},
{
title: "评价器MAC地址",
prop: "devicenum",
content: "",
title: '评价器MAC地址',
prop: 'devicenum',
content: ''
},
{
title: "评价状态",
prop: "evaluatestatus",
content: "",
title: '评价状态',
prop: 'evaluatestatus',
content: ''
},
{
title: "截图还是评价",
prop: "evaluatetype",
content: "",
title: '截图还是评价',
prop: 'evaluatetype',
content: ''
},
{
title: "截图地址",
prop: "photobefor",
content: "",
title: '截图地址',
prop: 'photobefor',
content: ''
},
{
title: "签字图片",
prop: "photoautograph",
content: "",
title: '签字图片',
prop: 'photoautograph',
content: ''
},
{
title: "抓拍评价人照片",
prop: "picture",
content: "",
title: '抓拍评价人照片',
prop: 'picture',
content: ''
},
{
title: "音视频地址",
prop: "process",
content: "",
title: '音视频地址',
prop: 'process',
content: ''
},
{
title: "评价标记",
prop: "eyevaluate",
content: "",
title: '评价标记',
prop: 'eyevaluate',
content: ''
},
{
title: "评价指向",
prop: "pjType",
content: "",
title: '评价指向',
prop: 'pjType',
content: ''
},
{
title: "评价时间",
prop: "pjTime",
content: "",
title: '评价时间',
prop: 'pjTime',
content: ''
},
{
title: "站点编码",
prop: "siteCode",
content: "",
title: '站点编码',
prop: 'siteCode',
content: ''
},
{
title: "站点名称",
prop: "siteName",
content: "",
title: '站点名称',
prop: 'siteName',
content: ''
},
{
title: "扩展编号",
prop: "extNum",
content: "",
},
],
title: '扩展编号',
prop: 'extNum',
content: ''
}
]
};
},
computed: {
......@@ -211,17 +195,17 @@ export default {
return this.show;
},
set(val) {
this.$emit("update:show", val);
},
this.$emit('update:show', val);
}
},
dataInfo() {
this.detailsList.forEach((v) => {
v.content = this.info[v.prop];
});
return this.detailsList;
},
}
},
methods: {},
methods: {}
};
</script>
......
<template>
<el-drawer
title="详情"
:visible.sync="drawer"
size="60%"
@close="drawer = false"
>
<el-drawer title="详情" :visible.sync="drawer" size="60%" @close="drawer = false">
<div class="main h-full w-full p-[20px]">
<el-descriptions
:column="3"
border
size="medium"
labelClassName="label-name"
>
<el-descriptions-item
v-for="(v, i) in dataInfo"
:key="i"
:label="v.title"
>
<el-descriptions :column="3" border size="medium" labelClassName="label-name">
<el-descriptions-item v-for="(v, i) in dataInfo" :key="i" :label="v.title">
{{ v.content }}
</el-descriptions-item>
</el-descriptions>
......@@ -29,158 +15,158 @@ export default {
props: {
show: {
type: Boolean,
default: false,
default: false
},
info: {
required: true,
type: Object,
default: () => {},
},
default: () => {}
}
},
data() {
return {
detailsList: [
{
title: "预约编号",
prop: "ordernumber",
content: "",
title: '预约编号',
prop: 'ordernumber',
content: ''
},
{
title: "叫号状态",
prop: "style",
content: "",
title: '叫号状态',
prop: 'style',
content: ''
},
{
title: "业务名称",
prop: "business",
content: "",
title: '业务名称',
prop: 'business',
content: ''
},
{
title: "窗口名称",
prop: "windowName",
content: "",
title: '窗口名称',
prop: 'windowName',
content: ''
},
{
title: "窗口编号",
prop: "windowFromnum",
content: "",
title: '窗口编号',
prop: 'windowFromnum',
content: ''
},
{
title: "流水编号,当天的第xxx号",
prop: "flownum",
content: "",
title: '流水编号,当天的第xxx号',
prop: 'flownum',
content: ''
},
{
title: "呼叫转移号",
prop: "formernum",
content: "",
title: '呼叫转移号',
prop: 'formernum',
content: ''
},
{
title: "姓名",
prop: "peopleName",
content: "",
title: '姓名',
prop: 'peopleName',
content: ''
},
{
title: "身份证号",
prop: "peopleIdcard",
content: "",
title: '身份证号',
prop: 'peopleIdcard',
content: ''
},
{
title: "性别",
prop: "peopleSex",
content: "",
title: '性别',
prop: 'peopleSex',
content: ''
},
{
title: "手机号",
prop: "peoplePhone",
content: "",
title: '手机号',
prop: 'peoplePhone',
content: ''
},
{
title: "工作人员姓名",
prop: "workmanName",
content: "",
title: '工作人员姓名',
prop: 'workmanName',
content: ''
},
{
title: "工作人员工号",
prop: "workmanNumber",
content: "",
title: '工作人员工号',
prop: 'workmanNumber',
content: ''
},
{
title: "取号时间",
prop: "taketime",
content: "",
title: '取号时间',
prop: 'taketime',
content: ''
},
{
title: "叫号时间",
prop: "calltime",
content: "",
title: '叫号时间',
prop: 'calltime',
content: ''
},
{
title: "结束时间",
prop: "endtime",
content: "",
title: '结束时间',
prop: 'endtime',
content: ''
},
{
title: "等待时间",
prop: "waitTime",
content: "",
title: '等待时间',
prop: 'waitTime',
content: ''
},
{
title: "办理时间",
prop: "handleTime",
content: "",
title: '办理时间',
prop: 'handleTime',
content: ''
},
{
title: "取号设备类型",
prop: "deviceType",
content: "",
title: '取号设备类型',
prop: 'deviceType',
content: ''
},
{
title: "取号设备名称",
prop: "deviceName",
content: "",
title: '取号设备名称',
prop: 'deviceName',
content: ''
},
{
title: "呼叫设备",
prop: "callName",
content: "",
title: '呼叫设备',
prop: 'callName',
content: ''
},
{
title: "事项名称",
prop: "matterName",
content: "",
title: '事项名称',
prop: 'matterName',
content: ''
},
{
title: "排号队列ID,唯一",
prop: "queueid",
content: "",
title: '排号队列ID,唯一',
prop: 'queueid',
content: ''
},
{
title: "大厅名称",
prop: "hallName",
content: "测试",
title: '大厅名称',
prop: 'hallName',
content: '测试'
},
{
title: "站点ID",
prop: "siteId",
content: "",
title: '站点ID',
prop: 'siteId',
content: ''
},
{
title: "站点编码",
prop: "siteCode",
content: "",
title: '站点编码',
prop: 'siteCode',
content: ''
},
{
title: "站点名称",
prop: "siteName",
content: "",
title: '站点名称',
prop: 'siteName',
content: ''
},
{
title: "扩展编号",
prop: "extNum",
content: "",
},
],
title: '扩展编号',
prop: 'extNum',
content: ''
}
]
};
},
computed: {
......@@ -189,17 +175,17 @@ export default {
return this.show;
},
set(val) {
this.$emit("update:show", val);
},
this.$emit('update:show', val);
}
},
dataInfo() {
this.detailsList.forEach((v) => {
v.content = this.info[v.prop];
});
return this.detailsList;
},
}
},
methods: {},
methods: {}
};
</script>
......
......@@ -5,35 +5,34 @@
</template>
<script>
import storage from "@/utils/storage";
import { mapMutations } from "vuex";
import { getHomeData } from "@/api/home";
import { generateRoutes, filterBtn } from "@/utils";
import { calcMenu } from "@/router";
import storage from '@/utils/storage';
import { mapMutations } from 'vuex';
import { getHomeData } from '@/api/home';
import { generateRoutes, filterBtn } from '@/utils';
import { calcMenu } from '@/router';
export default {
data() {
return {
menuList: [],
menuList: []
};
},
created() {
this.getToken();
},
methods: {
...mapMutations("user", [
"SET_token",
"SET_sysName",
"SET_sysLogo",
"SET_path",
"SET_userInfo",
"SET_permissions",
"SET_routes",
"SET_menusList",
...mapMutations('user', [
'SET_token',
'SET_sysName',
'SET_sysLogo',
'SET_path',
'SET_userInfo',
'SET_permissions',
'SET_routes',
'SET_menusList'
]),
// 获取token
async getToken() {
let { token, userInfo, siteid, siteName, sysName, sysLogo, path } =
this.$route.query;
let { token, userInfo, siteid, siteName, sysName, sysLogo, path } = this.$route.query;
if (token && userInfo) {
userInfo = JSON.parse(userInfo);
this.SET_userInfo(userInfo);
......@@ -41,11 +40,11 @@ export default {
this.SET_sysName(sysName);
this.SET_sysLogo(sysLogo);
this.SET_path(path);
storage.set(2, "siteId", siteid);
storage.set(2, "siteName", siteName);
storage.set(2, 'siteId', siteid);
storage.set(2, 'siteName', siteName);
await this.getIndixData();
} else {
this.$message.warning("跳转失败,请重新登录");
this.$message.warning('跳转失败,请重新登录');
setTimeout(() => {
location.href = process.env.VUE_APP_API_portal_URL;
}, 2000);
......@@ -67,7 +66,7 @@ export default {
let path = routes[0].path;
this.$router.push(path);
} else {
this.$message.warning("暂无权限,请联系管理员!");
this.$message.warning('暂无权限,请联系管理员!');
}
}
},
......@@ -78,8 +77,8 @@ export default {
.filter((v) => v.perms)
.map((v) => v.perms);
this.SET_permissions(btnPermissions);
},
},
}
}
};
</script>
......
......@@ -8,12 +8,12 @@
export default {
data() {
return {
subMenus: [],
subMenus: []
};
},
computed: {},
created() {},
methods: {},
methods: {}
};
</script>
......
......@@ -2,11 +2,7 @@
<div class="h-full w-full">
<TableHeader>
<div slot="left">
<el-button
size="small"
type="primary"
v-hasPermi="['system:access:add']"
@click="handleAdd"
<el-button size="small" type="primary" v-hasPermi="['system:access:add']" @click="handleAdd"
>新增</el-button
>
<el-button
......@@ -30,9 +26,7 @@
></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="handleSearch"
>搜 索</el-button
>
<el-button size="small" type="primary" @click="handleSearch">搜 索</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" @click="handleReset">重 置</el-button>
......@@ -77,63 +71,57 @@
</template>
<script>
import TableHeader from "@/components/TableHeader.vue";
import AddAccess from "./components/AddAccess.vue";
import AccessSystem from "./components/AccessSystem.vue";
import { getAccessList, delAccess } from "@/api/system";
import TableHeader from '@/components/TableHeader.vue';
import AddAccess from './components/AddAccess.vue';
import AccessSystem from './components/AccessSystem.vue';
import { getAccessList, delAccess } from '@/api/system';
export default {
components: {
TableHeader,
AddAccess,
AccessSystem,
AccessSystem
},
data() {
return {
column: [
{
label: "全选",
type: "selection",
width: "55",
align: "center",
reserveSelection: true,
label: '全选',
type: 'selection',
width: '55',
align: 'center',
reserveSelection: true
},
{
label: "序号",
type: "index",
width: "55",
align: "center",
label: '序号',
type: 'index',
width: '55',
align: 'center',
index: (index) => {
return (this.page - 1) * this.size + index + 1;
},
}
},
{
label: "区域名称",
prop: "areaName",
align: "center",
label: '区域名称',
prop: 'areaName',
align: 'center'
},
{
label: "区域编码",
prop: "areaCode",
align: "center",
label: '区域编码',
prop: 'areaCode',
align: 'center'
},
{
label: "背景图片",
prop: "bigPath",
align: "center",
label: '背景图片',
prop: 'bigPath',
align: 'center',
formatter: (row) => {
return (
<el-image
src={row.bigPath}
previewSrcList={[row.bigPath]}
class="h-[25px]"
/>
);
},
return <el-image src={row.bigPath} previewSrcList={[row.bigPath]} class="h-[25px]" />;
}
},
{
label: "接入系统",
align: "center",
label: '接入系统',
align: 'center',
formatter: (row) => {
if (row.accessSystemList && row.accessSystemList.length) {
return (
......@@ -144,16 +132,16 @@ export default {
</div>
);
}
},
}
},
{
label: "系统标签",
align: "center",
label: '系统标签',
align: 'center',
formatter: (row) => {
if (row.tag) {
return (
<div class="flex flex-wrap gap-2">
{row.tag.split(",").map((v) => {
{row.tag.split(',').map((v) => {
return (
<el-tag type="info" size="small">
{v}
......@@ -163,59 +151,59 @@ export default {
</div>
);
}
},
}
},
{
label: "对接时间",
align: "center",
label: '对接时间',
align: 'center',
formatter: (row) => {
if (row.accessTime) {
return this.$moment(row.accessTime).format("YYYY-MM-DD");
return this.$moment(row.accessTime).format('YYYY-MM-DD');
}
},
}
},
{
label: "排序",
prop: "sort",
width: "100",
align: "center",
label: '排序',
prop: 'sort',
width: '100',
align: 'center'
},
{
label: "描述",
prop: "content",
align: "center",
showOverflowTooltip: true,
label: '描述',
prop: 'content',
align: 'center',
showOverflowTooltip: true
},
{
label: "备注",
prop: "remark",
align: "center",
showOverflowTooltip: true,
label: '备注',
prop: 'remark',
align: 'center',
showOverflowTooltip: true
},
{
label: "操作",
align: "center",
width: "180",
label: '操作',
align: 'center',
width: '180',
formatter: (row) => {
return (
<div class="flex justify-center gap-4">
<span
v-hasPermi={["system:access:accessSystem"]}
v-hasPermi={['system:access:accessSystem']}
class="primary cursor-pointer"
onClick={() => this.accessSystem(row)}
>
接入系统
</span>
<span
v-hasPermi={["system:access:edit"]}
v-hasPermi={['system:access:edit']}
class="primary cursor-pointer"
onClick={() => this.handleEdit(row)}
>
编辑
</span>
<span
v-hasPermi={["system:access:remove"]}
v-hasPermi={['system:access:remove']}
class="delete cursor-pointer"
onClick={() => this.handleDel(row.id)}
>
......@@ -223,11 +211,11 @@ export default {
</span>
</div>
);
},
},
}
}
],
searchForm: {
areaName: "",
areaName: ''
},
tableData: [],
page: 1,
......@@ -236,11 +224,11 @@ export default {
loading: false,
selectRows: [],
show: false,
title: "新增",
title: '新增',
dict: {}, // 字典
systemList: [],
accessShow: false,
areaInfo: {},
areaInfo: {}
};
},
created() {
......@@ -254,7 +242,7 @@ export default {
let res = await getAccessList({
page: this.page,
size: this.size,
areaName: `%${this.searchForm.areaName}%`,
areaName: `%${this.searchForm.areaName}%`
});
this.loading = false;
if (res.data.code == 1) {
......@@ -271,23 +259,23 @@ export default {
// 批量移除
handleDelAll() {
if (!this.selectRows.length) {
this.$message.warning("请先勾选数据");
this.$message.warning('请先勾选数据');
return;
}
let ids = this.selectRows.map((v) => v.id).join(",");
let ids = this.selectRows.map((v) => v.id).join(',');
this.handleDel(ids);
},
// 搜索
handleSearch() {
this.page = 1;
this.$clearSelection("MyTable");
this.$clearSelection('MyTable');
this.getAccessList();
},
// 重置
handleReset() {
this.page = 1;
this.$clearSelection("MyTable");
this.$resetForm("searchForm");
this.$clearSelection('MyTable');
this.$resetForm('searchForm');
this.getAccessList();
},
// 选中
......@@ -297,24 +285,24 @@ export default {
// 新增
handleAdd() {
this.title = "新增";
this.title = '新增';
this.$refs.AddAccess.onAdd();
this.show = true;
},
// 编辑
handleEdit(row) {
this.title = "编辑";
this.title = '编辑';
let data = this.$cloneDeep(row);
this.$refs.AddAccess.onEdit(data);
this.show = true;
},
// 移除
handleDel(id) {
this.$confirm("此操作将删除所选数据,是否继续?", "系统提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
cancelButtonClass: "btn-custom-cancel",
type: "warning",
this.$confirm('此操作将删除所选数据,是否继续?', '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
})
.then(async () => {
let res = await delAccess({ id });
......@@ -322,19 +310,19 @@ export default {
if (code === 1) {
this.$message.success(msg);
this.getAccessList();
this.$clearSelection("MyTable");
this.$clearSelection('MyTable');
}
})
.catch(() => {
console.log("取消成功!");
console.log('取消成功!');
});
},
accessSystem(row) {
let data = this.$cloneDeep(row);
this.$refs.AccessSystem.onAdd(data);
this.accessShow = true;
},
},
}
}
};
</script>
......
......@@ -8,32 +8,18 @@
<div class="main w-full">
<el-button size="small" type="primary" @click="addSystem">添加</el-button>
<el-table :data="accessSystemList" style="width: 100%">
<el-table-column type="index" :index="1" label="序号" align="center">
</el-table-column>
<el-table-column type="index" :index="1" label="序号" align="center"> </el-table-column>
<el-table-column prop="systemName" align="center" label="系统名称">
<template slot-scope="scope">
<el-input
size="small"
placeholder="请输入"
v-model="scope.row.systemName"
></el-input>
<el-input size="small" placeholder="请输入" v-model="scope.row.systemName"></el-input>
</template>
</el-table-column>
<el-table-column prop="systemCode" align="center" label="系统编码">
<template slot-scope="scope">
<el-input
size="small"
placeholder="请输入"
v-model="scope.row.systemCode"
></el-input>
<el-input size="small" placeholder="请输入" v-model="scope.row.systemCode"></el-input>
</template>
</el-table-column>
<el-table-column
prop="accessTime"
align="center"
label="接入日期"
width="220"
>
<el-table-column prop="accessTime" align="center" label="接入日期" width="220">
<template slot-scope="scope">
<el-date-picker
style="width: 150px"
......@@ -46,18 +32,9 @@
</el-date-picker>
</template>
</el-table-column>
<el-table-column
width="80"
align="center"
prop="enabled"
label="启\停用"
>
<el-table-column width="80" align="center" prop="enabled" label="启\停用">
<template slot-scope="scope">
<YSwitch
active-text="启用"
inactive-text="停用"
v-model="scope.row.enabled"
></YSwitch>
<YSwitch active-text="启用" inactive-text="停用" v-model="scope.row.enabled"></YSwitch>
</template>
</el-table-column>
<el-table-column align="center" width="60" prop="enabled" label="删除">
......@@ -73,42 +50,36 @@
<div class="footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" @click="handleReset">重 置</el-button>
<el-button
size="small"
type="primary"
:loading="loading"
@click="handleOk"
>确 定</el-button
>
<el-button size="small" type="primary" :loading="loading" @click="handleOk">确 定</el-button>
</div>
</el-drawer>
</template>
<script>
import { saveAccess, deleteSystem } from "@/api/system";
import { saveAccess, deleteSystem } from '@/api/system';
export default {
props: {
show: {
type: Boolean,
default: false,
default: false
},
systemList: {
required: true,
type: Array,
default: () => [],
},
default: () => []
}
},
data() {
return {
loading: false,
form: {
systemName: "",
systemCode: "",
accessTime: "",
enabled: 1,
systemName: '',
systemCode: '',
accessTime: '',
enabled: 1
},
accessSystemList: [],
areaInfo: {},
areaInfo: {}
};
},
computed: {
......@@ -117,9 +88,9 @@ export default {
return this.show;
},
set(val) {
this.$emit("update:show", val);
},
},
this.$emit('update:show', val);
}
}
},
methods: {
......@@ -128,11 +99,11 @@ export default {
this.accessSystemList.push(row);
},
handleClose() {
this.$resetForm("form");
this.$resetForm('form');
this.drawer = false;
},
handleReset() {
this.$resetForm("form");
this.$resetForm('form');
this.drawer = false;
},
......@@ -150,7 +121,7 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$emit("success");
this.$emit('success');
this.handleClose();
}
this.loading = false;
......@@ -163,8 +134,8 @@ export default {
}
}
this.accessSystemList.splice($index, 1);
},
},
}
}
};
</script>
......
......@@ -9,19 +9,9 @@
:close-on-click-modal="false"
top="10vh"
>
<el-form
ref="form"
:model="form"
:rules="rules"
size="medium"
label-width="100px"
>
<el-form ref="form" :model="form" :rules="rules" size="medium" label-width="100px">
<el-form-item label="区域" prop="areaName">
<InputTree
:treeData="initTree"
v-model="form.areaName"
@change="changeArea"
></InputTree>
<InputTree :treeData="initTree" v-model="form.areaName" @change="changeArea"></InputTree>
</el-form-item>
<el-form-item label="系统标签" prop="tag">
<div class="flex gap-2">
......@@ -65,11 +55,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input-number
v-model="form.sort"
controls-position="right"
:min="0"
></el-input-number>
<el-input-number v-model="form.sort" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="描述" prop="content">
<el-input
......@@ -93,11 +79,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="medium" @click="handleRest">重 置</el-button>
<el-button
size="medium"
type="primary"
:loading="loading"
@click="handleOk"
<el-button size="medium" type="primary" :loading="loading" @click="handleOk"
>确 定</el-button
>
</span>
......@@ -106,74 +88,70 @@
</template>
<script>
import { mapState } from "vuex";
import { saveAccess } from "@/api/system";
import InputTree from "./InputTree.vue";
import { mapState } from 'vuex';
import { saveAccess } from '@/api/system';
import InputTree from './InputTree.vue';
export default {
components: {
InputTree,
InputTree
},
props: {
title: {
type: String,
required: true,
default: "",
default: ''
},
show: {
type: Boolean,
required: true,
default: false,
},
default: false
}
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL,
loading: false,
inputVisible: false,
inputValue: "",
inputValue: '',
bigPathList: [],
form: {
areaName: "",
areaCode: "",
areaId: "",
siteId: "",
siteCode: "",
siteName: "",
latitude: "",
longitude: "",
type: "",
bigPath: "",
areaName: '',
areaCode: '',
areaId: '',
siteId: '',
siteCode: '',
siteName: '',
latitude: '',
longitude: '',
type: '',
bigPath: '',
tag: [],
sort: 99,
remark: "",
icon: "",
accessTime: "", // 接入时间
content: "", // 内容
accessSystemList: [],
remark: '',
icon: '',
accessTime: '', // 接入时间
content: '', // 内容
accessSystemList: []
},
rules: {
areaName: [
{ required: true, message: "请选择区域", trigger: "change" },
],
bigPath: [
{ required: true, message: "请上传背景图片", trigger: "change" },
],
},
areaName: [{ required: true, message: '请选择区域', trigger: 'change' }],
bigPath: [{ required: true, message: '请上传背景图片', trigger: 'change' }]
}
};
},
computed: {
...mapState("user", ["areaTree"]),
...mapState('user', ['areaTree']),
Visible: {
get() {
return this.show;
},
set(val) {
this.$emit("update:show", val);
},
this.$emit('update:show', val);
}
},
initTree() {
return this.addAreaNameField(this.areaTree);
},
}
},
methods: {
// 确定
......@@ -183,12 +161,12 @@ export default {
this.loading = true;
let res = await saveAccess({
...this.form,
tag: this.form.tag.join(","),
tag: this.form.tag.join(',')
});
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$emit("success");
this.$emit('success');
this.handleClose();
}
this.loading = false;
......@@ -198,14 +176,14 @@ export default {
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
this.form.id && this.$delete(this.form, 'id');
},
// 编辑
onEdit(row) {
setTimeout(() => {
this.form = row;
if (this.form.tag) {
this.form.tag = this.form.tag.split(",");
this.form.tag = this.form.tag.split(',');
} else {
this.form.tag = [];
}
......@@ -213,8 +191,8 @@ export default {
this.bigPathList = [
{
name: this.form.bigPath,
url: this.form.bigPath,
},
url: this.form.bigPath
}
];
}
}, 10);
......@@ -222,33 +200,24 @@ export default {
// 重置
handleRest() {
this.bigPathList = [];
this.$resetForm("form");
this.$resetForm('form');
},
// 关闭
handleClose() {
this.bigPathList = [];
this.$resetForm("form");
this.$resetForm('form');
this.Visible = false;
},
changeArea(row) {
let {
areaName,
areaCode,
id,
label,
siteCode,
latitude,
longitude,
type,
} = row;
let { areaName, areaCode, id, label, siteCode, latitude, longitude, type } = row;
this.form.areaId = "";
this.form.siteId = "";
this.form.siteName = "";
this.form.areaId = '';
this.form.siteId = '';
this.form.siteName = '';
if (type === "area") {
if (type === 'area') {
this.form.areaId = id;
} else if (type === "site") {
} else if (type === 'site') {
this.form.siteId = id;
this.form.siteName = label;
}
......@@ -280,7 +249,7 @@ export default {
showInput() {
if (this.form.tag.length >= 2) {
this.$message.warning("暂时只能添加两个系统标签");
this.$message.warning('暂时只能添加两个系统标签');
return;
}
this.inputVisible = true;
......@@ -293,15 +262,15 @@ export default {
let inputValue = this.inputValue;
if (inputValue) {
if (this.form.tag.includes(inputValue)) {
this.$message.warning("已存在相同标签");
this.$message.warning('已存在相同标签');
return;
}
this.form.tag.push(inputValue);
}
this.inputVisible = false;
this.inputValue = "";
},
},
this.inputValue = '';
}
}
};
</script>
......
......@@ -23,41 +23,41 @@
<script>
export default {
name: "InputTree",
name: 'InputTree',
props: {
treeData: {
type: Array,
default: () => {
return [];
},
}
},
value: {
default: "",
default: ''
},
defaultProps: {
type: Object,
default: () => {
return {
children: "children",
label: "areaName",
children: 'children',
label: 'areaName'
};
},
},
}
}
},
data() {
return {};
},
methods: {
handleClear() {
this.$emit("input", "");
this.$emit("change", {});
this.$emit('input', '');
this.$emit('change', {});
this.$refs.tree.setCurrentKey(null);
},
handleNodeClick(row) {
this.$emit("input", row.areaName);
this.$emit("change", row);
},
},
this.$emit('input', row.areaName);
this.$emit('change', row);
}
}
};
</script>
......
......@@ -2,12 +2,8 @@
<div class="h-full w-full">
<TableHeader>
<div slot="left">
<el-button size="small" type="primary" @click="handleAdd"
>新增</el-button
>
<el-button size="small" type="danger" @click="handleDelAll"
>批量删除</el-button
>
<el-button size="small" type="primary" @click="handleAdd">新增</el-button>
<el-button size="small" type="danger" @click="handleDelAll">批量删除</el-button>
</div>
<div slot="right">
<el-form ref="searchForm" :model="searchForm" inline>
......@@ -22,9 +18,7 @@
></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="handleSearch"
>搜 索</el-button
>
<el-button size="small" type="primary" @click="handleSearch">搜 索</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" @click="handleReset">重 置</el-button>
......@@ -63,89 +57,83 @@
</template>
<script>
import TableHeader from "@/components/TableHeader.vue";
import { getSystemList, deleteSystem } from "@/api/system";
import AddAreaSystem from "./components/AddAreaSystem.vue";
import TableHeader from '@/components/TableHeader.vue';
import { getSystemList, deleteSystem } from '@/api/system';
import AddAreaSystem from './components/AddAreaSystem.vue';
export default {
components: {
TableHeader,
AddAreaSystem,
AddAreaSystem
},
data() {
return {
column: [
{
label: "全选",
type: "selection",
width: "55",
align: "center",
reserveSelection: true,
label: '全选',
type: 'selection',
width: '55',
align: 'center',
reserveSelection: true
},
{
label: "序号",
type: "index",
width: "55",
align: "center",
label: '序号',
type: 'index',
width: '55',
align: 'center',
index: (index) => {
return (this.page - 1) * this.size + index + 1;
},
}
},
{
label: "系统名称",
prop: "systemName",
align: "center",
label: '系统名称',
prop: 'systemName',
align: 'center'
},
{
label: "系统编码",
prop: "systemCode",
align: "center",
label: '系统编码',
prop: 'systemCode',
align: 'center'
},
{
label: "创建时间",
align: "center",
label: '创建时间',
align: 'center',
formatter: (row) => {
if (row.createTime) {
return this.$moment(row.createTime).format("YYYY-MM-DD HH:mm:ss");
return this.$moment(row.createTime).format('YYYY-MM-DD HH:mm:ss');
}
},
}
},
{
label: "排序",
prop: "sort",
align: "center",
label: '排序',
prop: 'sort',
align: 'center'
},
{
label: "备注",
prop: "remark",
align: "center",
label: '备注',
prop: 'remark',
align: 'center'
},
{
label: "操作",
align: "center",
width: "120",
label: '操作',
align: 'center',
width: '120',
formatter: (row) => {
return (
<div class="flex justify-center gap-4">
<span
class="primary cursor-pointer"
onClick={() => this.handleEdit(row)}
>
<span class="primary cursor-pointer" onClick={() => this.handleEdit(row)}>
编辑
</span>
<span
class="delete cursor-pointer"
onClick={() => this.handleDel(row.id)}
>
<span class="delete cursor-pointer" onClick={() => this.handleDel(row.id)}>
删除
</span>
</div>
);
},
},
}
}
],
searchForm: {
systemName: "",
systemName: ''
},
tableData: [],
page: 1,
......@@ -154,8 +142,8 @@ export default {
loading: false,
selectRows: [],
show: false,
title: "新增",
dict: {}, // 字典
title: '新增',
dict: {} // 字典
};
},
created() {
......@@ -169,7 +157,7 @@ export default {
let res = await getSystemList({
page: this.page,
size: this.size,
systemName: `%${this.searchForm.systemName}%`,
systemName: `%${this.searchForm.systemName}%`
});
this.loading = false;
if (res.data.code == 1) {
......@@ -186,23 +174,23 @@ export default {
// 批量移除
handleDelAll() {
if (!this.selectRows.length) {
this.$message.warning("请先勾选数据");
this.$message.warning('请先勾选数据');
return;
}
let ids = this.selectRows.map((v) => v.id).join(",");
let ids = this.selectRows.map((v) => v.id).join(',');
this.handleDel(ids);
},
// 搜索
handleSearch() {
this.page = 1;
this.$clearSelection("MyTable");
this.$clearSelection('MyTable');
this.getSystemList();
},
// 重置
handleReset() {
this.page = 1;
this.$clearSelection("MyTable");
this.$resetForm("searchForm");
this.$clearSelection('MyTable');
this.$resetForm('searchForm');
this.getSystemList();
},
// 选中
......@@ -212,24 +200,24 @@ export default {
// 新增
handleAdd() {
this.title = "新增";
this.title = '新增';
this.$refs.AddAreaSystem.onAdd();
this.show = true;
},
// 编辑
handleEdit(row) {
this.title = "编辑";
this.title = '编辑';
let data = this.$cloneDeep(row);
this.$refs.AddAreaSystem.onEdit(data);
this.show = true;
},
// 移除
handleDel(id) {
this.$confirm("此操作将删除所选数据,是否继续?", "系统提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
cancelButtonClass: "btn-custom-cancel",
type: "warning",
this.$confirm('此操作将删除所选数据,是否继续?', '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
})
.then(async () => {
let res = await deleteSystem({ id });
......@@ -237,14 +225,14 @@ export default {
if (code === 1) {
this.$message.success(msg);
this.getSystemList();
this.$clearSelection("MyTable");
this.$clearSelection('MyTable');
}
})
.catch(() => {
console.log("取消成功!");
console.log('取消成功!');
});
},
},
}
}
};
</script>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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