Commit 4e2cc3ab authored by 姬鋆屾's avatar 姬鋆屾

推修改样式

parent fd41805c
<template> <template>
<div id="app"> <div id="app">
<router-view/> <router-view />
</div> </div>
</template> </template>
<style lang="less" scoped>
/deep/.el-table th {
background: #fafafa !important;
color: rgba(0, 0, 0, 0.85) !important;
}
/deep/.el-table .cell {
font-size: 14px;
}
/deep/.el-table th,
/deep/.el-table tr {
height: 54px;
text-align: center;
}
/deep/.el-drawer__header {
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
padding-bottom: 20px;
color: #000;
}
</style>
...@@ -281,6 +281,7 @@ a { ...@@ -281,6 +281,7 @@ a {
background: linear-gradient(90deg, #1845c6, #2999ff) !important; background: linear-gradient(90deg, #1845c6, #2999ff) !important;
} }
.layout-menu-wrapper .layout-logo { .layout-menu-wrapper .layout-logo {
width: 335px;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
...@@ -311,16 +312,17 @@ a { ...@@ -311,16 +312,17 @@ a {
background-color: #1890ff !important; background-color: #1890ff !important;
} }
.layout-header .layout-submenu-wrapper { .layout-header .layout-submenu-wrapper {
width: 95% !important; width: 98% !important;
margin: 0 auto !important; margin: 0 auto !important;
margin-top: 20px !important; margin-top: 20px !important;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
padding-left: 0px !important;
} }
.page.active { .page.active {
width: 95% !important; width: 98% !important;
margin: 0 auto !important; margin: 0 auto !important;
padding: 20px !important; padding: 10px !important;
padding-top: 0 !important; padding-top: 0 !important;
} }
.page { .page {
...@@ -329,3 +331,11 @@ a { ...@@ -329,3 +331,11 @@ a {
border-bottom-left-radius: 8px; border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px; border-bottom-right-radius: 8px;
} }
.el-button--primary {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
}
.el-button {
height: 32px;
line-height: 8px;
}
...@@ -321,6 +321,7 @@ a { ...@@ -321,6 +321,7 @@ a {
background: linear-gradient(90deg, #1845c6, #2999ff) !important; background: linear-gradient(90deg, #1845c6, #2999ff) !important;
} }
.layout-menu-wrapper .layout-logo { .layout-menu-wrapper .layout-logo {
width: 335px;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
...@@ -351,16 +352,17 @@ a { ...@@ -351,16 +352,17 @@ a {
background-color: #1890ff !important; background-color: #1890ff !important;
} }
.layout-header .layout-submenu-wrapper { .layout-header .layout-submenu-wrapper {
width: 95% !important; width: 98% !important;
margin: 0 auto !important; margin: 0 auto !important;
margin-top: 20px !important; margin-top: 20px !important;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
padding-left: 0px !important;
} }
.page.active { .page.active {
width: 95% !important; width: 98% !important;
margin: 0 auto !important; margin: 0 auto !important;
padding: 20px !important; padding: 10px !important;
padding-top: 0 !important; padding-top: 0 !important;
} }
.page { .page {
...@@ -369,3 +371,11 @@ a { ...@@ -369,3 +371,11 @@ a {
border-bottom-left-radius: 8px; border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px; border-bottom-right-radius: 8px;
} }
.el-button--primary {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
}
.el-button {
height: 32px;
line-height: 8px;
}
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
:width="column.width" :width="column.width"
:sortable="column.sortable" :sortable="column.sortable"
:show-overflow-tooltip="column.tooltip" :show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'center'"
:formatter="column.formatter" :formatter="column.formatter"
:reserve-selection="column.reserveSelection" :reserve-selection="column.reserveSelection"
:subColumns="column.subColumns" :subColumns="column.subColumns"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
:label="sunColumn.label" :label="sunColumn.label"
:width="sunColumn.width" :width="sunColumn.width"
:sortable="sunColumn.sortable" :sortable="sunColumn.sortable"
:align="sunColumn.align || 'left'" :align="sunColumn.align || 'center'"
:formatter="sunColumn.formatter" :formatter="sunColumn.formatter"
/> />
</el-table-column> </el-table-column>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:label="column.label" :label="column.label"
:width="column.width" :width="column.width"
:show-overflow-tooltip="column.tooltip" :show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'center'"
:formatter='column.formatter' :formatter='column.formatter'
> >
</el-table-column> </el-table-column>
......
...@@ -272,7 +272,7 @@ export default { ...@@ -272,7 +272,7 @@ export default {
line-height: 50px; line-height: 50px;
font-size: 14px; font-size: 14px;
color: #eee; color: #eee;
background: #1848c8; // background: #1848c8;
.layout-logo { .layout-logo {
height: 50px; height: 50px;
.el-icon-menu { .el-icon-menu {
...@@ -288,6 +288,7 @@ export default { ...@@ -288,6 +288,7 @@ export default {
.menu-list { .menu-list {
li { li {
width: 120px;
a { a {
display: block; display: block;
padding: 0 12px; padding: 0 12px;
...@@ -326,6 +327,7 @@ export default { ...@@ -326,6 +327,7 @@ export default {
white-space: nowrap; white-space: nowrap;
overflow: auto; overflow: auto;
li { li {
margin-right: 10px;
a { a {
display: block; display: block;
padding: 0 10px; padding: 0 10px;
......
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
</div> </div>
</template> </template>
<script> <script>
//import { getSiteTree } from "@/services/businessMatter"; //import { getSiteTree } from "@/services/businessMatter";
import session from "@/assets/utils/session"; import session from "@/assets/utils/session";
//import Cookie from "js-cookie"; //import Cookie from "js-cookie";
export default { export default {
data() { data() {
return { return {
...@@ -111,12 +111,12 @@ export default { ...@@ -111,12 +111,12 @@ export default {
process.env.VUE_APP_SITETREE_URL == "undefined" process.env.VUE_APP_SITETREE_URL == "undefined"
? "http://192.168.0.98:11078/base/site/siteTree" ? "http://192.168.0.98:11078/base/site/siteTree"
: process.env.VUE_APP_SITETREE_URL; : process.env.VUE_APP_SITETREE_URL;
console.log(url) console.log(url);
this.$get(url).then((res) => { this.$get(url).then((res) => {
const { siteTree } = res.data; const { siteTree } = res.data;
this.sitelist = siteTree; this.sitelist = siteTree;
let arr = []; let arr = [];
const treeFn = function (e) { const treeFn = function(e) {
e.forEach((element) => { e.forEach((element) => {
arr.push(element); arr.push(element);
if (element.children && element.children.length > 0) { if (element.children && element.children.length > 0) {
...@@ -155,11 +155,11 @@ export default { ...@@ -155,11 +155,11 @@ export default {
position: relative; position: relative;
} }
.ant-dropdown-link { .ant-dropdown-link {
padding: 0 20px;
font-size: 14px; font-size: 14px;
min-width: 200px; min-width: 150px;
color: #eee; color: #eee;
display: inline-block; display: inline-block;
margin-top: 2px;
} }
.select-site { .select-site {
position: fixed; position: fixed;
......
...@@ -325,13 +325,12 @@ export default { ...@@ -325,13 +325,12 @@ export default {
) { ) {
//支持模糊查询,收尾增加百分号 //支持模糊查询,收尾增加百分号
val = val.trim(); val = val.trim();
if(val.charAt(0)!='%'){ if (val.charAt(0) != "%") {
val = "%" + val val = "%" + val;
} }
if(val.charAt(val.length-1)!='%'){ if (val.charAt(val.length - 1) != "%") {
val =val + "%"; val = val + "%";
} }
} }
}); });
newData[item] = this.decodeVal(val); newData[item] = this.decodeVal(val);
...@@ -379,10 +378,18 @@ export default { ...@@ -379,10 +378,18 @@ export default {
width: 140px; width: 140px;
} }
} }
.el-form--inline .el-form-item {
margin-right: 0;
}
.el-form-item {
margin-bottom: 10px !important;
margin-right: 0;
margin-left: 10px;
}
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
.search-form-wapper { .search-form-wapper {
.el-form-item { .el-form-item {
margin-bottom: 10px !important;
width: 100%; width: 100%;
.el-form-item__label { .el-form-item__label {
min-width: 70px; min-width: 70px;
...@@ -397,4 +404,3 @@ export default { ...@@ -397,4 +404,3 @@ export default {
} }
} }
</style> </style>
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<div class="layout-table" :loading="data.loading"> <div class="layout-table" :loading="data.loading">
<div class="table-head flex flex-pack-justify"> <div class="table-head flex flex-pack-justify">
<div class="table-head-left flex flex-align-center"> <div class="table-head-left flex flex-align-center">
<slot name="breadcrumb"> <!-- <slot name="breadcrumb">
<Breadcrumb style="margin-left: 10px" /> <Breadcrumb style="margin-left: 10px" />
</slot> </slot> -->
<div class="buttons"> <div class="buttons">
<el-row> <el-row>
<slot name="table-head-left"></slot> <slot name="table-head-left"></slot>
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
v-if="!isShowButton('notPagination') ? false : data.pageInfo.totalResult" v-if="!isShowButton('notPagination') ? false : data.pageInfo.totalResult"
> >
<Pagination <Pagination
style="float: left" style="float: right"
:total="data.pageInfo.totalResult" :total="data.pageInfo.totalResult"
:prePageResult="data.pageInfo.prePageResult" :prePageResult="data.pageInfo.prePageResult"
/> />
...@@ -325,10 +325,10 @@ export default { ...@@ -325,10 +325,10 @@ export default {
} }
.layout-table { .layout-table {
.table-head { .table-head {
margin-bottom: 10px; // margin-bottom: 10px;
//padding-bottom: 12px; //padding-bottom: 12px;
// padding-top: 7px; // padding-top: 7px;
border-bottom: 1px solid #ededed; // border-bottom: 1px solid #ededed;
.el-breadcrumb { .el-breadcrumb {
margin-right: 30px; margin-right: 30px;
} }
...@@ -349,7 +349,6 @@ export default { ...@@ -349,7 +349,6 @@ export default {
} }
.table-form { .table-form {
padding-top: 10px; padding-top: 10px;
margin-top: 10px;
overflow: hidden; overflow: hidden;
} }
.search-form-wapper { .search-form-wapper {
......
<template> <template>
<span> <span>
<el-button v-if='!noEdit' type="text" icon="el-icon-edit" size='mini' @click='$emit("edit", row)' title="编辑">编辑</el-button> <el-button
v-if="!noEdit"
type="text"
icon="el-icon-edit"
size="mini"
@click="$emit('edit', row)"
title="编辑"
>编辑</el-button
>
<span>&nbsp;</span> <span>&nbsp;</span>
<el-button v-if='!noView' type="text" icon="el-icon-view" size='mini' @click='$emit("view", row)' title="查看">查看</el-button> <el-button
v-if="!noView"
type="text"
icon="el-icon-view"
size="mini"
@click="$emit('view', row)"
title="查看"
>查看</el-button
>
<span>&nbsp;</span> <span>&nbsp;</span>
<Confirm @confirm='$emit("del", row.id)' message='确定要删除该条记录吗?'> <Confirm @confirm="$emit('del', row.id)" message="确定要删除该条记录吗?">
<el-button v-if='!noDel' type="text" icon="el-icon-delete" size='mini' title="删除">删除</el-button> <el-button
v-if="!noDel"
type="text"
icon="el-icon-delete"
size="mini"
title="删除"
style="margin-left: 0;margin-right: 5px;color: #FA4D4C;"
>删除</el-button
>
</Confirm> </Confirm>
</span> </span>
</template> </template>
<script> <script>
import Confirm from '@/components/Confirm.vue'; import Confirm from "@/components/Confirm.vue";
export default { export default {
props: { props: {
noEdit: { noEdit: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
noDel: { noDel: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
noAdd: { noAdd: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
noView: { noView: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
row: { row: {
type: Object, type: Object,
required: true, required: true,
default: () => {} default: () => {},
}, },
}, },
components: { components: {
Confirm, Confirm,
}, },
methods: { methods: {},
},
data() { data() {
return { return {};
},
} };
}
}
</script> </script>
...@@ -16,7 +16,5 @@ export default { ...@@ -16,7 +16,5 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.page-home { .page-home {
margin-top: 20px !important; margin-top: 20px !important;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
} }
</style> </style>
<template> <template>
<div :style="menuPageCss" class="pages page-layout"> <div :style="menuPageCss" class="pages page-layout">
<LayoutHeader v-if="menuPage!=='left'"></LayoutHeader> <LayoutHeader v-if="menuPage !== 'left'"></LayoutHeader>
<LayoutHeaderLeft @toggle="toggle" :isOpen="isOpen" v-if="menuPage==='left'" /> <LayoutHeaderLeft
<router-view :class="{'active': !isOpen}" /> @toggle="toggle"
:isOpen="isOpen"
v-if="menuPage === 'left'"
/>
<router-view :class="{ active: !isOpen }" />
</div> </div>
</template> </template>
<script> <script>
...@@ -54,13 +58,12 @@ export default { ...@@ -54,13 +58,12 @@ export default {
} }
} }
.page-layout { .page-layout {
background: #eee; background: #f0f2f5;
} }
.layout-header .layout-menu-wrapper{ .layout-header .layout-menu-wrapper {
background: #2681e8!important; // background: #2681e8!important;
height: 4rem; height: 4rem;
line-height: 4rem; line-height: 4rem;
} }
</style>
</style>
...@@ -2,79 +2,106 @@ ...@@ -2,79 +2,106 @@
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="200px"> <el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-row> <el-row style="margin-bottom: 20px;">
<Field :span="20" label="是否启用该服务" prop="used" v-model="form.used" type="radio" :enumData="dict.used" placeholder="请选择是否启用该服务"/> <Field
:span="20"
label="是否启用该服务"
prop="used"
v-model="form.used"
type="radio"
:enumData="dict.used"
placeholder="请选择是否启用该服务"
/>
<Field :span="20" label="监测周期配置"> <Field :span="20" label="监测周期配置">
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.monday"
true-label="1" >周一</el-checkbox
false-label="0" >
v-model="form.monday"
>周一</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.tuesday"
true-label="1" >周二</el-checkbox
false-label="0" >
v-model="form.tuesday"
>周二</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.wednesday"
true-label="1" >周三</el-checkbox
false-label="0" >
v-model="form.wednesday"
>周三</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.thursday"
true-label="1" >周四</el-checkbox
false-label="0" >
v-model="form.thursday"
>周四</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.friday"
true-label="1" >周五</el-checkbox
false-label="0" >
v-model="form.friday" <el-checkbox true-label="1" false-label="0" v-model="form.saturday"
>周五</el-checkbox> >周六</el-checkbox
<el-checkbox >
true-label="1"
false-label="0"
v-model="form.saturday"
>周六</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.sunday"
true-label="1" >周日</el-checkbox
false-label="0" >
v-model="form.sunday"
>周日</el-checkbox>
</Field> </Field>
<Field :span="20" label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/> <Field
<Field :span="20" label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/> :span="20"
<Field :span="20" label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> label="单日服务最大人数设置"
prop="maxServicePersonNum"
v-model="form.maxServicePersonNum"
placeholder="请输入单日服务最大人数设置"
/>
<Field
:span="20"
label="累计服务频次预警"
prop="alertServiceNum"
v-model="form.alertServiceNum"
placeholder="请输入累计服务频次预警"
/>
<Field
:span="20"
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row> </el-row>
<el-divider content-position="center" style="color: #aaa;"
><span style="color: #aaa;"
>预约自动签到配置时间段信息</span
></el-divider
>
<el-divider content-position="center">预约自动签到配置时间段信息</el-divider> <br />
<br/>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddAppointmentConfigTimes">添加</el-button> <el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAddAppointmentConfigTimes"
>添加</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteAppointmentConfigTimes">删除</el-button> <el-button
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDeleteAppointmentConfigTimes"
>删除</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="appointmentConfigTimesList" :row-class-name="rowAppointmentConfigTimesIndex" @selection-change="handleAppointmentConfigTimesSelectionChange" ref="appointmentConfigTimes"> <el-table
:data="appointmentConfigTimesList"
:row-class-name="rowAppointmentConfigTimesIndex"
@selection-change="handleAppointmentConfigTimesSelectionChange"
ref="appointmentConfigTimes"
>
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50" />
<el-table-column label="开始时间" prop="serviceTimeStart"> <el-table-column label="开始时间" prop="serviceTimeStart">
<template slot-scope="scope"> <template slot-scope="scope">
<el-time-select <el-time-select
placeholder="起始时间" placeholder="起始时间"
v-model="scope.row.serviceTimeStart" v-model="scope.row.serviceTimeStart"
...@@ -83,10 +110,11 @@ ...@@ -83,10 +110,11 @@
:picker-options="{ :picker-options="{
start: '08:00', start: '08:00',
step: '00:30', step: '00:30',
end: '18:00' end: '18:00',
}"> }"
>
</el-time-select> </el-time-select>
<!-- <el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />--> <!-- <el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结束时间" prop="serviceTimeEnd"> <el-table-column label="结束时间" prop="serviceTimeEnd">
...@@ -98,11 +126,12 @@ ...@@ -98,11 +126,12 @@
:picker-options="{ :picker-options="{
start: '08:00', start: '08:00',
step: '00:30', step: '00:30',
end: '18:00' end: '18:00',
}"> }"
>
</el-time-select> </el-time-select>
<!-- <el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入时间段结束时间" />--> <!-- <el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入时间段结束时间" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"> <el-table-column label="备注" prop="remark">
...@@ -111,23 +140,27 @@ ...@@ -111,23 +140,27 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button> <el-button
type="primary"
v-if="pageInfo.type !== 'view'"
@click="submitForm"
>确 定</el-button
>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import moment from 'moment'; import moment from "moment";
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
export default { export default {
mixins: [form], mixins: [form],
components: { components: {
dialogShow , dialogShow,
}, },
data() { data() {
return { return {
...@@ -141,7 +174,7 @@ ...@@ -141,7 +174,7 @@
title: "预约自动签到配置", title: "预约自动签到配置",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
toString:[ toString: [
"used", "used",
"monday", "monday",
"tuesday", "tuesday",
...@@ -153,10 +186,8 @@ ...@@ -153,10 +186,8 @@
], ],
// 表单校验 // 表单校验
rules: { rules: {
createTime: [ createTime: [{ required: true, message: "请选择创建时间" }],
{required: true,message: "请选择创建时间" }, },
],
}
}; };
}, },
...@@ -180,9 +211,14 @@ ...@@ -180,9 +211,14 @@
/** 预约自动签到配置时间段删除按钮操作 */ /** 预约自动签到配置时间段删除按钮操作 */
handleDeleteAppointmentConfigTimes() { handleDeleteAppointmentConfigTimes() {
if (this.checkedAppointmentConfigTimes.length == 0) { if (this.checkedAppointmentConfigTimes.length == 0) {
this.$alert("请先选择要删除的预约自动签到配置时间段数据", "提示", { confirmButtonText: "确定", }); this.$alert("请先选择要删除的预约自动签到配置时间段数据", "提示", {
confirmButtonText: "确定",
});
} else { } else {
this.appointmentConfigTimesList.splice(this.checkedAppointmentConfigTimes[0].index - 1, 1); this.appointmentConfigTimesList.splice(
this.checkedAppointmentConfigTimes[0].index - 1,
1
);
} }
}, },
/** 单选框选中数据 */ /** 单选框选中数据 */
...@@ -196,39 +232,40 @@ ...@@ -196,39 +232,40 @@
}, },
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.appointmentConfigTimesList) { if (data.entity.appointmentConfigTimesList) {
data.entity.appointmentConfigTimesList.map(i=>{ data.entity.appointmentConfigTimesList.map((i) => {
i.serviceTimeStart = moment(i.serviceTimeStart).format('HH:mm') i.serviceTimeStart = moment(i.serviceTimeStart).format("HH:mm");
i.serviceTimeEnd = moment(i.serviceTimeEnd).format('HH:mm') i.serviceTimeEnd = moment(i.serviceTimeEnd).format("HH:mm");
}) });
this.appointmentConfigTimesList = data.entity.appointmentConfigTimesList; this.appointmentConfigTimesList =
data.entity.appointmentConfigTimesList;
} }
return data return data;
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="appointment/config/edit"; this.urls.currUrl = "appointment/config/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改预约自动签到配置"; this.title = "修改预约自动签到配置";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "appointment/config/add"; this.urls.currUrl = "appointment/config/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增预约自动签到配置"; this.title = "新增预约自动签到配置";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="appointment/config/view"; this.urls.currUrl = "appointment/config/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "预约自动签到配置详细"; this.title = "预约自动签到配置详细";
}, },
/**取消按钮 */ /**取消按钮 */
...@@ -240,13 +277,20 @@ ...@@ -240,13 +277,20 @@
this.open = true; this.open = true;
}, },
beforeSubmit(data) { beforeSubmit(data) {
data.appointmentConfigTimesList.map(i=>{ data.appointmentConfigTimesList.map((i) => {
const serviceTimeStart = moment(i.serviceTimeStart, 'HH:mm'); const serviceTimeStart = moment(i.serviceTimeStart, "HH:mm");
const serviceTimeEnd = moment(i.serviceTimeEnd, 'HH:mm'); const serviceTimeEnd = moment(i.serviceTimeEnd, "HH:mm");
i.serviceTimeStart = moment().set({hour: serviceTimeStart.hour(), minute: serviceTimeStart.minute()}).format('yyyy-MM-DD HH:mm:ss'); i.serviceTimeStart = moment()
i.serviceTimeEnd = moment().set({hour: serviceTimeEnd.hour(), minute: serviceTimeEnd.minute()}).format('yyyy-MM-DD HH:mm:ss'); .set({
hour: serviceTimeStart.hour(),
minute: serviceTimeStart.minute(),
}) })
return data .format("yyyy-MM-DD HH:mm:ss");
i.serviceTimeEnd = moment()
.set({ hour: serviceTimeEnd.hour(), minute: serviceTimeEnd.minute() })
.format("yyyy-MM-DD HH:mm:ss");
});
return data;
}, },
afterSubmit(data) { afterSubmit(data) {
...@@ -257,19 +301,19 @@ ...@@ -257,19 +301,19 @@
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
siteId : null, siteId: null,
siteName : "", siteName: "",
used : 0, used: 0,
monday : 0, monday: 0,
tuesday : 0, tuesday: 0,
wednesday : 0, wednesday: 0,
thursday : 0, thursday: 0,
friday : 0, friday: 0,
saturday : 0, saturday: 0,
sunday : 0, sunday: 0,
maxServicePersonNum : 0, maxServicePersonNum: 0,
alertServiceNum : 0, alertServiceNum: 0,
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -279,5 +323,5 @@ ...@@ -279,5 +323,5 @@
} }
}, },
}, },
}; };
</script> </script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" :config="tableConfig"> </LayoutTable>
</LayoutTable>
<dialog-show ref="dialogform" @ok="getData" />
<dialog-show ref="dialogform" @ok="getData"/>
</div> </div>
</template> </template>
...@@ -16,11 +14,10 @@ import table from "@/assets/mixins/table"; ...@@ -16,11 +14,10 @@ import table from "@/assets/mixins/table";
export default { export default {
name: "AppointmentConfigList", name: "AppointmentConfigList",
components: { components: {
dialogShow dialogShow,
}, },
mixins: [table], mixins: [table],
created() { created() {},
},
methods: { methods: {
renderTable(tableData) { renderTable(tableData) {
return ( return (
...@@ -30,15 +27,13 @@ export default { ...@@ -30,15 +27,13 @@ export default {
); );
}, },
renderTableColumn(options) { renderTableColumn(options) {
return ( return (
<el-table-column <el-table-column
prop={options.prop} prop={options.prop}
label={options.label} label={options.label}
width={options.width} width={options.width}
formatter={options.formatter} formatter={options.formatter}
> ></el-table-column>
</el-table-column>
); );
}, },
/** 重写新增方法 */ /** 重写新增方法 */
...@@ -53,41 +48,52 @@ export default { ...@@ -53,41 +48,52 @@ export default {
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
}, },
data() { data() {
return { return {
/** 子表列元素 */ /** 子表列元素 */
columnSet: [ columnSet: [
{prop: "serviceTimeStart", label: "服务开始时间", width: 200, formatter: this.formatterDate}, {
{prop: "serviceTimeEnd", label: "服务结束时间", width: 200, formatter: this.formatterDate}, prop: "serviceTimeStart",
{prop: "remark", label: "备注", width: 100}, label: "服务开始时间",
width: 200,
formatter: this.formatterDate,
align: "center",
},
{
prop: "serviceTimeEnd",
label: "服务结束时间",
width: 200,
formatter: this.formatterDate,
align: "center",
},
{ prop: "remark", label: "备注", width: 200, align: "center" },
], ],
config: { config: {
search: [], search: [],
columns: [ columns: [
{type: "selection", width: 60}, { type: "selection", width: 60 },
{type: "index", label: "序号", width: 50}, { type: "index", label: "序号", width: 50 },
{label: "启用", prop: "used", formatter: this.formatter}, { label: "启用", prop: "used", formatter: this.formatter },
{label: "周一", prop: "monday", formatter: this.formatter}, { label: "周一", prop: "monday", formatter: this.formatter },
{label: "周二", prop: "tuesday", formatter: this.formatter}, { label: "周二", prop: "tuesday", formatter: this.formatter },
{label: "周三", prop: "wednesday", formatter: this.formatter}, { label: "周三", prop: "wednesday", formatter: this.formatter },
{label: "周四", prop: "thursday", formatter: this.formatter}, { label: "周四", prop: "thursday", formatter: this.formatter },
{label: "周五", prop: "friday", formatter: this.formatter}, { label: "周五", prop: "friday", formatter: this.formatter },
{label: "周六", prop: "saturday", formatter: this.formatter}, { label: "周六", prop: "saturday", formatter: this.formatter },
{label: "周日", prop: "sunday", formatter: this.formatter}, { label: "周日", prop: "sunday", formatter: this.formatter },
{label: "最大人数", prop: "maxServicePersonNum"}, { label: "最大人数", prop: "maxServicePersonNum" },
{label: "累计预警", prop: "alertServiceNum"}, { label: "累计预警", prop: "alertServiceNum" },
{ {
label: "配置时间段", label: "配置时间段",
...@@ -100,7 +106,9 @@ export default { ...@@ -100,7 +106,9 @@ export default {
return ( return (
<el-popover placement="right" width={widthsize} trigger="click"> <el-popover placement="right" width={widthsize} trigger="click">
{this.renderTable(row.appointmentConfigTimesList)} {this.renderTable(row.appointmentConfigTimesList)}
<el-button type="text" slot="reference">详细</el-button> <el-button type="text" slot="reference">
详细
</el-button>
</el-popover> </el-popover>
); );
}, },
...@@ -108,15 +116,21 @@ export default { ...@@ -108,15 +116,21 @@ export default {
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: (row) => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel}/> <table-buttons
noAdd
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
); );
} },
} },
] ],
} },
}; };
} },
}; };
</script> </script>
...@@ -5,9 +5,13 @@ ...@@ -5,9 +5,13 @@
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="90%"> size="90%"
<div> >
<div class="warning">系统检测以下人员(20人)识别频次过高:</div> <div style="height: 100%;">
<div class="warning">
<i class="el-icon-s-opportunity"></i
>系统检测以下人员(20人)识别频次过高:
</div>
<div class="drawer_box"> <div class="drawer_box">
<div class="drawer_box_left"> <div class="drawer_box_left">
<el-table <el-table
...@@ -15,30 +19,42 @@ ...@@ -15,30 +19,42 @@
:data="tableDataL" :data="tableDataL"
highlight-current-row highlight-current-row
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
style="width: 100%"> style="width: 100%"
border
>
<el-table-column <el-table-column
type="index" type="index"
label="序号" label="序号"
width="50"> width="50"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="name" property="name"
label="姓名" label="姓名"
width="80"> width="80"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="contact" property="contact"
label="联系电话"> label="联系电话"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="identifyNum" property="identifyNum"
label="识别频次" label="识别频次"
width="80"> width="80"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="lastIdentifyTime" property="lastIdentifyTime"
label="最近识别时间" label="最近识别时间"
:formatter= "this.formatterDate"> :formatter="this.formatterDate"
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -46,46 +62,67 @@ ...@@ -46,46 +62,67 @@
<div class="recognition"> <div class="recognition">
<div> <div>
<div class="recognition_name">{{ singleSelect.name }}</div> <div class="recognition_name">{{ singleSelect.name }}</div>
<div class="recognition_desc">联系电话:{{ singleSelect.contact }} | 身份证号:{{ singleSelect.idNumber }} | 识别频次:{{ singleSelect.identifyNum }}</div> <div class="recognition_desc">
联系电话:{{ singleSelect.contact }} <br />
身份证号:{{ singleSelect.idNumber }} <br />
识别频次:{{ singleSelect.identifyNum }}
</div>
</div> </div>
<div> <div>
<el-button type="danger" @click="show= true">服务约束</el-button> <el-button
type="danger"
@click="show = true"
style="width: 120px;height: 48px;line-height: 24px;font-size: 16px; font-weight: 600;"
>服务约束</el-button
>
</div> </div>
</div> </div>
<el-table <el-table :data="tableDataR" style="width: 100%" border>
:data="tableDataR"
style="width: 100%">
<el-table-column <el-table-column
type="index" type="index"
label="序号" label="序号"
width="50"> width="50"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="monitorDeviceId" property="monitorDeviceId"
label="监测时间" label="监测时间"
:formatter= "this.formatterDate"> :formatter="this.formatterDate"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="monitorDevice" property="monitorDevice"
label="监测设备"> label="监测设备"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="reservationService" property="reservationService"
label="预约业务"> label="预约业务"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="reservationNumber" property="reservationNumber"
label="预约编号"> label="预约编号"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="checkInMethod" property="checkInMethod"
label="签到方式"> label="签到方式"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="monitorCertificate" property="monitorCertificate"
label="监测凭证"> label="监测凭证"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.monitorCertificate" alt="图片"> <img :src="scope.row.monitorCertificate" alt="图片" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -95,18 +132,32 @@ ...@@ -95,18 +132,32 @@
:current-page="this.params.page" :current-page="this.params.page"
:page-size="this.params.size" :page-size="this.params.size"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="this.total"> :total="this.total"
style="text-align: right;"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
<el-dialog title="限制取号" :visible.sync="show" width="31.25rem" append-to-body> <el-dialog
<el-form ref="form" :model="restrict" :label-position="right" label-width="7.5rem"> title="限制取号"
:visible.sync="show"
width="31.25rem"
append-to-body
>
<el-form
ref="form"
:model="restrict"
:label-position="right"
label-width="7.5rem"
>
<el-form-item label="姓名:">{{ restrict.name }}</el-form-item> <el-form-item label="姓名:">{{ restrict.name }}</el-form-item>
<el-form-item label="联系电话:">{{ restrict.contact }}</el-form-item> <el-form-item label="联系电话:">{{ restrict.contact }}</el-form-item>
<el-form-item label="身份证号:">{{ restrict.idNumber }}</el-form-item> <el-form-item label="身份证号:">{{ restrict.idNumber }}</el-form-item>
<el-form-item label="识别频次:">{{ restrict.identifyNum }}</el-form-item> <el-form-item label="识别频次:">{{
restrict.identifyNum
}}</el-form-item>
<el-form-item label="限制取号:"> <el-form-item label="限制取号:">
<el-input placeholder="请输入内容" v-model="restrict.times"> <el-input placeholder="请输入内容" v-model="restrict.times">
<template slot="append">次 / 天</template> <template slot="append">次 / 天</template>
...@@ -114,8 +165,8 @@ ...@@ -114,8 +165,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="show= false">确 定</el-button> <el-button type="primary" @click="show = false">确 定</el-button>
<el-button @click="show= false">取 消</el-button> <el-button @click="show = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -125,12 +176,9 @@ ...@@ -125,12 +176,9 @@
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "dataDrawerShow", name: "dataDrawerShow",
components: { components: {},
},
mixins: [table], mixins: [table],
created() { created() {},
},
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -141,95 +189,100 @@ export default { ...@@ -141,95 +189,100 @@ export default {
open: false, open: false,
// 限制取号 // 限制取号
show: false, show: false,
direction:"rtl", direction: "rtl",
// 左侧表格数据 // 左侧表格数据
tableDataL:[], tableDataL: [],
// 左侧被选中的数据 // 左侧被选中的数据
singleSelect: {}, singleSelect: {},
// 右侧表格数据 // 右侧表格数据
tableDataR: [], tableDataR: [],
params: { params: {
size: 10, size: 10,
page: 1 page: 1,
}, },
total: 0, total: 0,
restrict:{ restrict: {
name: '', name: "",
contact: '', contact: "",
idNumber: '', idNumber: "",
identifyNum: '', identifyNum: "",
times: '' times: "",
} },
} };
}, },
methods: { methods: {
view(row) { view(row) {
this.open=true this.open = true;
this.getAllMonitor() this.getAllMonitor();
}, },
async getAllMonitor(){ async getAllMonitor() {
const res = await this.$post('monitor/alarm/list') const res = await this.$post("monitor/alarm/list");
if(res && res.code == 1){ if (res && res.code == 1) {
this.tableDataL= res.data.data this.tableDataL = res.data.data;
console.log(res) console.log(res);
this.total= res.data.total this.total = res.data.total;
this.params.page= res.data.current_page this.params.page = res.data.current_page;
this.params.size= res.data.per_page this.params.size = res.data.per_page;
this.$refs.singleTable.setCurrentRow(this.tableDataL[0]) // 默认选中第一条 this.$refs.singleTable.setCurrentRow(this.tableDataL[0]); // 默认选中第一条
} }
}, },
async handleCurrentChange(row){ async handleCurrentChange(row) {
this.singleSelect= row this.singleSelect = row;
this.restrict= {...row} this.restrict = { ...row };
const res = await this.$post('monitor/alarm/record/list') const res = await this.$post("monitor/alarm/record/list");
if(res && res.code == 1){ if (res && res.code == 1) {
this.tableDataR= res.data.data this.tableDataR = res.data.data;
} }
}, },
// 监听size改变 // 监听size改变
changeSize (newSize) { changeSize(newSize) {
this.size = newSize this.size = newSize;
}, },
// 页码改变 // 页码改变
changePage (newPage) { changePage(newPage) {
this.page = newPage this.page = newPage;
}, },
}, },
}; };
</script> </script>
<style scope> <style scope>
.warning{ .warning {
padding: 0 .625rem; padding: 0 0.625rem;
height: 1.875rem; height: 3rem;
line-height: 1.875rem; line-height: 3rem;
font-size: 1.25rem; font-size: 1.25rem;
color: #F94545; color: #f94545;
padding-left: 20px;
background: rgba(249, 69, 69, 0.1);
} }
.drawer_box{ .drawer_box {
display: flex; display: flex;
height: 90%;
} }
.drawer_box_left{ .drawer_box_left {
height: 100%;
width: 37.5rem; width: 37.5rem;
padding: .625rem; padding: 0.625rem;
border-right: 1px solid #f0f0f0;
} }
.drawer_box_right{ .drawer_box_right {
flex: 1; flex: 1;
padding: .625rem; padding: 0.625rem;
} }
.recognition{ .recognition {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: .625rem; margin-bottom: 0.625rem;
} }
.recognition_name{ .recognition_name {
font-size: 1.25rem; font-size: 1.25rem;
color: #333; color: #333;
margin-bottom: .3125rem; margin-bottom: 0.3125rem;
} }
.recognition_desc{ .recognition_desc {
font-size: .875rem; font-size: 0.875rem;
color: #666; color: #666;
} }
</style> </style>
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
size="mini" size="mini"
type="danger" type="danger"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="200px"> <el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-row> <el-row style="margin-bottom: 20px;">
<!-- <!--
<Field :span="20" label="是否启用该服务" prop="used" v-model="form.used" type="radio" :enumData="dict.used" placeholder="请选择是否启用该服务"/> <Field :span="20" label="是否启用该服务" prop="used" v-model="form.used" type="radio" :enumData="dict.used" placeholder="请选择是否启用该服务"/>
--> -->
...@@ -13,77 +13,112 @@ ...@@ -13,77 +13,112 @@
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949" inactive-color="#ff4949"
active-value="1" active-value="1"
inactive-value="0"> inactive-value="0"
>
</el-switch> </el-switch>
</Field> </Field>
<Field :span="20" label="监测周期配置"> <Field :span="20" label="监测周期配置">
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.monday"
true-label="1" >周一</el-checkbox
false-label="0" >
v-model="form.monday"
>周一</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.tuesday"
true-label="1" >周二</el-checkbox
false-label="0" >
v-model="form.tuesday"
>周二</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.wednesday"
true-label="1" >周三</el-checkbox
false-label="0" >
v-model="form.wednesday"
>周三</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.thursday"
true-label="1" >周四</el-checkbox
false-label="0" >
v-model="form.thursday"
>周四</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.friday"
true-label="1" >周五</el-checkbox
false-label="0" >
v-model="form.friday" <el-checkbox true-label="1" false-label="0" v-model="form.saturday"
>周五</el-checkbox> >周六</el-checkbox
<el-checkbox >
true-label="1"
false-label="0"
v-model="form.saturday"
>周六</el-checkbox>
<el-checkbox <el-checkbox true-label="1" false-label="0" v-model="form.sunday"
true-label="1" >周日</el-checkbox
false-label="0" >
v-model="form.sunday"
>周日</el-checkbox>
</Field> </Field>
<Field :span="20" label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/> <Field
<Field :span="20" label="服务阈值设置,单位分钟" prop="serviceThreshold" v-model="form.serviceThreshold" placeholder="请输入服务阈值设置,单位分钟"/> :span="20"
<Field :span="20" label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/> label="单日服务最大人数设置"
<Field :span="20" label="消息发送对象" prop="msgRecipients" v-model="form.msgRecipients" type="checkbox" :enumData="dict.msgRecipients" /> prop="maxServicePersonNum"
<Field :span="20" label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> v-model="form.maxServicePersonNum"
placeholder="请输入单日服务最大人数设置"
/>
<Field
:span="20"
label="服务阈值设置,单位分钟"
prop="serviceThreshold"
v-model="form.serviceThreshold"
placeholder="请输入服务阈值设置,单位分钟"
/>
<Field
:span="20"
label="累计服务频次预警"
prop="alertServiceNum"
v-model="form.alertServiceNum"
placeholder="请输入累计服务频次预警"
/>
<Field
:span="20"
label="消息发送对象"
prop="msgRecipients"
v-model="form.msgRecipients"
type="checkbox"
:enumData="dict.msgRecipients"
/>
<Field
:span="20"
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row> </el-row>
<el-divider content-position="center">主动关怀时间段信息</el-divider> <el-divider content-position="center" style="color: #aaa;"
<br/> ><span style="color: #aaa;">主动关怀时间段信息</span></el-divider
>
<br />
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddCareConfigTimes">添加</el-button> <el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAddCareConfigTimes"
>添加</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteCareConfigTimes">删除</el-button> <el-button
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDeleteCareConfigTimes"
>删除</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="careConfigTimesList" :row-class-name="rowCareConfigTimesIndex" @selection-change="handleCareConfigTimesSelectionChange" ref="careConfigTimes"> <el-table
:data="careConfigTimesList"
:row-class-name="rowCareConfigTimesIndex"
@selection-change="handleCareConfigTimesSelectionChange"
ref="careConfigTimes"
>
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50" />
<el-table-column label="开始时间" prop="serviceTimeStart"> <el-table-column label="开始时间" prop="serviceTimeStart">
<template slot-scope="scope"> <template slot-scope="scope">
<el-time-select <el-time-select
placeholder="起始时间" placeholder="起始时间"
v-model="scope.row.serviceTimeStart" v-model="scope.row.serviceTimeStart"
...@@ -92,8 +127,9 @@ ...@@ -92,8 +127,9 @@
:picker-options="{ :picker-options="{
start: '08:00', start: '08:00',
step: '00:30', step: '00:30',
end: '18:00' end: '18:00',
}"> }"
>
</el-time-select> </el-time-select>
<!-- <el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />--> <!-- <el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />-->
</template> </template>
...@@ -107,8 +143,9 @@ ...@@ -107,8 +143,9 @@
:picker-options="{ :picker-options="{
start: '08:00', start: '08:00',
step: '00:30', step: '00:30',
end: '18:00' end: '18:00',
}"> }"
>
</el-time-select> </el-time-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -118,23 +155,27 @@ ...@@ -118,23 +155,27 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button> <el-button
type="primary"
v-if="pageInfo.type !== 'view'"
@click="submitForm"
>确 定</el-button
>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import moment from "moment/moment"; import moment from "moment/moment";
export default { export default {
mixins: [form], mixins: [form],
components: { components: {
dialogShow , dialogShow,
}, },
data() { data() {
return { return {
...@@ -149,7 +190,7 @@ ...@@ -149,7 +190,7 @@
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
toArrays: ["msgRecipients"], toArrays: ["msgRecipients"],
toString:[ toString: [
"used", "used",
"monday", "monday",
"tuesday", "tuesday",
...@@ -161,11 +202,8 @@ ...@@ -161,11 +202,8 @@
], ],
// 表单校验 // 表单校验
rules: { rules: {
createTime: [{ required: true, message: "请选择创建时间" }],
createTime: [ },
{required: true,message: "请选择创建时间" },
],
}
}; };
}, },
...@@ -189,9 +227,14 @@ ...@@ -189,9 +227,14 @@
/** 主动关怀时间段删除按钮操作 */ /** 主动关怀时间段删除按钮操作 */
handleDeleteCareConfigTimes() { handleDeleteCareConfigTimes() {
if (this.checkedCareConfigTimes.length == 0) { if (this.checkedCareConfigTimes.length == 0) {
this.$alert("请先选择要删除的主动关怀时间段数据", "提示", { confirmButtonText: "确定", }); this.$alert("请先选择要删除的主动关怀时间段数据", "提示", {
confirmButtonText: "确定",
});
} else { } else {
this.careConfigTimesList.splice(this.checkedCareConfigTimes[0].index - 1, 1); this.careConfigTimesList.splice(
this.checkedCareConfigTimes[0].index - 1,
1
);
} }
}, },
/** 单选框选中数据 */ /** 单选框选中数据 */
...@@ -205,39 +248,39 @@ ...@@ -205,39 +248,39 @@
}, },
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.careConfigTimesList) { if (data.entity.careConfigTimesList) {
data.entity.careConfigTimesList.map(i=>{ data.entity.careConfigTimesList.map((i) => {
i.serviceTimeStart = moment(i.serviceTimeStart).format('HH:mm') i.serviceTimeStart = moment(i.serviceTimeStart).format("HH:mm");
i.serviceTimeEnd = moment(i.serviceTimeEnd).format('HH:mm') i.serviceTimeEnd = moment(i.serviceTimeEnd).format("HH:mm");
}) });
this.careConfigTimesList = data.entity.careConfigTimesList; this.careConfigTimesList = data.entity.careConfigTimesList;
} }
return data return data;
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="care/config/edit"; this.urls.currUrl = "care/config/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改主动关怀配置"; this.title = "修改主动关怀配置";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "care/config/add"; this.urls.currUrl = "care/config/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增主动关怀配置"; this.title = "新增主动关怀配置";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="care/config/view"; this.urls.currUrl = "care/config/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "主动关怀配置详细"; this.title = "主动关怀配置详细";
}, },
/**取消按钮 */ /**取消按钮 */
...@@ -250,17 +293,24 @@ ...@@ -250,17 +293,24 @@
}, },
beforeSubmit(data) { beforeSubmit(data) {
data.careConfigTimesList.map(i=>{ data.careConfigTimesList.map((i) => {
const serviceTimeStart = moment(i.serviceTimeStart, 'HH:mm'); const serviceTimeStart = moment(i.serviceTimeStart, "HH:mm");
const serviceTimeEnd = moment(i.serviceTimeEnd, 'HH:mm'); const serviceTimeEnd = moment(i.serviceTimeEnd, "HH:mm");
i.serviceTimeStart = moment().set({hour: serviceTimeStart.hour(), minute: serviceTimeStart.minute()}).format('yyyy-MM-DD HH:mm:ss'); i.serviceTimeStart = moment()
i.serviceTimeEnd = moment().set({hour: serviceTimeEnd.hour(), minute: serviceTimeEnd.minute()}).format('yyyy-MM-DD HH:mm:ss'); .set({
hour: serviceTimeStart.hour(),
minute: serviceTimeStart.minute(),
}) })
.format("yyyy-MM-DD HH:mm:ss");
i.serviceTimeEnd = moment()
.set({ hour: serviceTimeEnd.hour(), minute: serviceTimeEnd.minute() })
.format("yyyy-MM-DD HH:mm:ss");
});
if (Array.isArray(data["msgRecipients"])) { if (Array.isArray(data["msgRecipients"])) {
data.msgRecipients = data.msgRecipients.filter(Boolean).join(); data.msgRecipients = data.msgRecipients.filter(Boolean).join();
} }
return data return data;
}, },
afterSubmit(data) { afterSubmit(data) {
...@@ -271,21 +321,21 @@ ...@@ -271,21 +321,21 @@
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
siteId : null, siteId: null,
siteName : "", siteName: "",
used : 0, used: 0,
monday : 0, monday: 0,
tuesday : 0, tuesday: 0,
wednesday : 0, wednesday: 0,
thursday : 0, thursday: 0,
friday : 0, friday: 0,
saturday : 0, saturday: 0,
sunday : 0, sunday: 0,
maxServicePersonNum : 0, maxServicePersonNum: 0,
serviceThreshold : 0, serviceThreshold: 0,
alertServiceNum : null, alertServiceNum: null,
msgRecipients : "", msgRecipients: "",
remark : "", remark: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -295,5 +345,5 @@ ...@@ -295,5 +345,5 @@
} }
}, },
}, },
}; };
</script> </script>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
columnSet:[ columnSet:[
{prop:"serviceTimeStart",label:"服务开始时间",width:200,formatter: this.formatterDate}, {prop:"serviceTimeStart",label:"服务开始时间",width:200,formatter: this.formatterDate},
{prop:"serviceTimeEnd",label:"服务结束时间",width:200,formatter: this.formatterDate}, {prop:"serviceTimeEnd",label:"服务结束时间",width:200,formatter: this.formatterDate},
{prop:"remark",label:"备注",width:100}, {prop:"remark",label:"备注",width:200},
], ],
config: { config: {
search: [ search: [
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
size="mini" size="mini"
@click="handleImport" @click="handleImport"
......
...@@ -5,9 +5,13 @@ ...@@ -5,9 +5,13 @@
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="95%"> size="95%"
<div> >
<div class="warning">系统检测以下人员(20人)识别频次过高:</div> <div style="height: 100%;">
<div class="warning">
<i class="el-icon-s-opportunity"></i>
系统检测以下人员(20人)识别频次过高:
</div>
<div class="drawer_box"> <div class="drawer_box">
<div class="drawer_box_left"> <div class="drawer_box_left">
<el-table <el-table
...@@ -15,30 +19,42 @@ ...@@ -15,30 +19,42 @@
:data="tableDataL" :data="tableDataL"
highlight-current-row highlight-current-row
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
style="width: 100%"> style="width: 100%"
border
>
<el-table-column <el-table-column
type="index" type="index"
label="序号" label="序号"
width="50"> width="50"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="name" property="name"
label="姓名" label="姓名"
width="80"> width="80"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="contact" property="contact"
label="联系电话"> label="联系电话"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="identifyNum" property="identifyNum"
label="识别频次" label="识别频次"
width="80"> width="80"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="lastIdentifyTime" property="lastIdentifyTime"
label="最近识别时间" label="最近识别时间"
:formatter= "this.formatterDate"> :formatter="this.formatterDate"
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -46,46 +62,71 @@ ...@@ -46,46 +62,71 @@
<div class="recognition"> <div class="recognition">
<div> <div>
<div class="recognition_name">{{ singleSelect.name }}</div> <div class="recognition_name">{{ singleSelect.name }}</div>
<div class="recognition_desc">联系电话:{{ singleSelect.contact }} | 身份证号:{{ singleSelect.idNumber }} | 识别频次:{{ singleSelect.identifyNum }}</div> <div class="recognition_desc">
联系电话:{{ singleSelect.contact }} <br />
身份证号:{{ singleSelect.idNumber }}<br />
识别频次:{{ singleSelect.identifyNum }}
</div>
</div> </div>
<div> <div>
<el-button type="primary" @click="show= true">限制取号</el-button> <el-button
type="primary"
@click="show = true"
style="width: 120px;height: 48px;line-height: 24px;font-size: 16px; font-weight: 600;"
>限制取号</el-button
>
</div> </div>
</div> </div>
<el-table <el-table :data="tableDataR" style="width: 100%" border>
:data="tableDataR"
style="width: 100%">
<el-table-column <el-table-column
type="index" type="index"
label="序号" label="序号"
width="50"> width="50"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="monitorTime" property="monitorTime"
label="监测时间" label="监测时间"
:formatter= "this.formatterDate"> :formatter="this.formatterDate"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="monitorDevice" property="monitorDevice"
label="监测设备"> label="监测设备"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="reservationService" property="reservationService"
label="预约业务"> label="预约业务"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="reservationNumber" property="reservationNumber"
label="预约编号"> label="预约编号"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="checkInMethod" property="checkInMethod"
label="签到方式"> label="签到方式"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="monitorCertificate" property="monitorCertificate"
label="监测凭证"> label="监测凭证"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<img style="width: 70px; height: 100px" :src="scope.row.monitorCertificate" alt="图片"> <img
style="width: 70px; height: 100px"
:src="scope.row.monitorCertificate"
alt="图片"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -95,18 +136,32 @@ ...@@ -95,18 +136,32 @@
:current-page="this.params.page" :current-page="this.params.page"
:page-size="this.params.size" :page-size="this.params.size"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="this.total"> :total="this.total"
style="text-align: end;"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
<el-dialog title="限制取号" :visible.sync="show" width="31.25rem" append-to-body> <el-dialog
<el-form ref="form" :model="restrict" :label-position="right" label-width="7.5rem"> title="限制取号"
:visible.sync="show"
width="31.25rem"
append-to-body
>
<el-form
ref="form"
:model="restrict"
:label-position="right"
label-width="7.5rem"
>
<el-form-item label="姓名:">{{ restrict.name }}</el-form-item> <el-form-item label="姓名:">{{ restrict.name }}</el-form-item>
<el-form-item label="联系电话:">{{ restrict.contact }}</el-form-item> <el-form-item label="联系电话:">{{ restrict.contact }}</el-form-item>
<el-form-item label="身份证号:">{{ restrict.idNumber }}</el-form-item> <el-form-item label="身份证号:">{{ restrict.idNumber }}</el-form-item>
<el-form-item label="识别频次:">{{ restrict.identifyNum }}</el-form-item> <el-form-item label="识别频次:">{{
restrict.identifyNum
}}</el-form-item>
<el-form-item label="限制取号:"> <el-form-item label="限制取号:">
<el-input placeholder="请输入内容" v-model="restrict.times"> <el-input placeholder="请输入内容" v-model="restrict.times">
<template slot="append">次 / 天</template> <template slot="append">次 / 天</template>
...@@ -114,8 +169,8 @@ ...@@ -114,8 +169,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="show= false">确 定</el-button> <el-button type="primary" @click="show = false">确 定</el-button>
<el-button @click="show= false">取 消</el-button> <el-button @click="show = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -125,12 +180,9 @@ ...@@ -125,12 +180,9 @@
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "dataDrawerShow", name: "dataDrawerShow",
components: { components: {},
},
mixins: [table], mixins: [table],
created() { created() {},
},
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -141,95 +193,102 @@ export default { ...@@ -141,95 +193,102 @@ export default {
open: false, open: false,
// 限制取号 // 限制取号
show: false, show: false,
direction:"rtl", direction: "rtl",
// 左侧表格数据 // 左侧表格数据
tableDataL:[], tableDataL: [],
// 左侧被选中的数据 // 左侧被选中的数据
singleSelect: {}, singleSelect: {},
// 右侧表格数据 // 右侧表格数据
tableDataR: [], tableDataR: [],
params: { params: {
size: 10, size: 10,
page: 1 page: 1,
}, },
total: 0, total: 0,
restrict:{ restrict: {
name: '', name: "",
contact: '', contact: "",
idNumber: '', idNumber: "",
identifyNum: '', identifyNum: "",
times: '' times: "",
} },
} };
}, },
methods: { methods: {
view(row) { view(row) {
this.open=true this.open = true;
this.getAllMonitor() this.getAllMonitor();
}, },
async getAllMonitor(){ async getAllMonitor() {
const res = await this.$post('monitor/alarm/list') const res = await this.$post("monitor/alarm/list");
if(res && res.code == 1){ if (res && res.code == 1) {
this.tableDataL= res.data.data this.tableDataL = res.data.data;
console.log(res) console.log(res);
this.total= res.data.total this.total = res.data.total;
this.params.page= res.data.current_page this.params.page = res.data.current_page;
this.params.size= res.data.per_page this.params.size = res.data.per_page;
this.$refs.singleTable.setCurrentRow(this.tableDataL[0]) // 默认选中第一条 this.$refs.singleTable.setCurrentRow(this.tableDataL[0]); // 默认选中第一条
} }
}, },
async handleCurrentChange(row){ async handleCurrentChange(row) {
this.singleSelect= row this.singleSelect = row;
this.restrict= {...row} this.restrict = { ...row };
const res = await this.$post('monitor/alarm/record/list') const res = await this.$post("monitor/alarm/record/list");
if(res && res.code == 1){ if (res && res.code == 1) {
this.tableDataR= res.data.data this.tableDataR = res.data.data;
} }
}, },
// 监听size改变 // 监听size改变
changeSize (newSize) { changeSize(newSize) {
this.size = newSize this.size = newSize;
}, },
// 页码改变 // 页码改变
changePage (newPage) { changePage(newPage) {
this.page = newPage this.page = newPage;
}, },
}, },
}; };
</script> </script>
<style scope> <style scope>
.warning{ .warning {
padding: 0 .625rem; padding: 0 0.625rem;
height: 1.875rem; height: 3rem;
line-height: 1.875rem; line-height: 3rem;
font-size: 1.25rem; font-size: 1.25rem;
color: #F94545; color: #f94545;
padding-left: 20px;
background: rgba(249, 69, 69, 0.1);
} }
.drawer_box{ .drawer_box {
display: flex; display: flex;
height: 100%;
padding: 20px 10px;
} }
.drawer_box_left{ .drawer_box_left {
height: 100%;
width: 37.5rem; width: 37.5rem;
padding: .625rem; padding: 0.625rem;
border-right: 1px solid #f0f0f0;
} }
.drawer_box_right{ .drawer_box_right {
flex: 1; flex: 1;
padding: .625rem; padding: 0.625rem;
} }
.recognition{ .recognition {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: .625rem; margin-bottom: 0.625rem;
} }
.recognition_name{ .recognition_name {
font-size: 1.25rem; font-size: 1.25rem;
color: #333; color: #000;
margin-bottom: .3125rem; font-weight: 600;
margin-bottom: 0.3125rem;
} }
.recognition_desc{ .recognition_desc {
font-size: .875rem; font-size: 0.875rem;
color: #666; color: #666;
} }
</style> </style>
<template> <template>
<div class="page"> <div class="page">
<span
style="position: absolute; top: -30px;right: 0;font-size: 12px; color: #aaa;"
>
<i class="el-icon-warning"></i
> 流量数据由海康提供,本系统提供15日暂存服务。</span
>
<LayoutTable notAdd notDel :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets" icon="el-icon-tickets"
size="mini" size="mini"
type="danger" type="danger"
......
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