Commit 4906ee9e authored by “yiyousong”'s avatar “yiyousong”

feat;添加窗口屏显示名称

parent c0f82097
...@@ -120,6 +120,23 @@ ...@@ -120,6 +120,23 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row>
<a-col :span="24">
<a-form-model-item
:labelCol="{ span: 3 }"
:wrapperCol="{ span: 19 }"
label="窗口屏显示"
prop="nameDesc"
>
<a-input
v-model="form.nameDesc"
type="textarea"
allowClear
placeholder="请输入窗口屏显示名称"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item <a-form-model-item
...@@ -154,19 +171,8 @@ ...@@ -154,19 +171,8 @@
placeholder="请输入所属楼栋" placeholder="请输入所属楼栋"
v-model.number="form.building" v-model.number="form.building"
> >
<!-- <a-input-number
v-model="form.building"
style="width: 220px"
:min="1"
placeholder="请输入所属楼栋"
/> -->
<span slot="suffix"></span> <span slot="suffix"></span>
</a-input> </a-input>
<!-- <a-select v-model="form.building" placeholder="请选择所属楼栋">
<a-select-option v-for="v in 10" :key="v" :value="v"
>{{ v }}栋</a-select-option
>
</a-select> -->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
...@@ -178,12 +184,6 @@ ...@@ -178,12 +184,6 @@
<a-input placeholder="请输入所属楼栋" v-model.number="form.level"> <a-input placeholder="请输入所属楼栋" v-model.number="form.level">
<span slot="suffix"></span> <span slot="suffix"></span>
</a-input> </a-input>
<!-- <a-select v-model="form.level" placeholder="请选择所属楼层">
<a-select-option v-for="v in 10" :key="v" :value="v"
>{{ v }}层</a-select-option
>
</a-select> -->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -224,6 +224,8 @@ export default { ...@@ -224,6 +224,8 @@ export default {
duty: "", // 无人值守 duty: "", // 无人值守
dutyContent: "", // 无人值守显示内容 dutyContent: "", // 无人值守显示内容
dutyEnglish: "", // 无人值守显示英文内容 dutyEnglish: "", // 无人值守显示英文内容
nameDesc: "", // 窗口屏显示名称
englishNameDesc: "", // 英文名称
}, },
rules: { rules: {
siteName: [ siteName: [
...@@ -233,15 +235,6 @@ export default { ...@@ -233,15 +235,6 @@ export default {
{ required: true, message: "部门不能为空", trigger: "change" }, { required: true, message: "部门不能为空", trigger: "change" },
], ],
name: [{ required: true, message: "窗口名不能为空", trigger: "blur" }], name: [{ required: true, message: "窗口名不能为空", trigger: "blur" }],
// englishName: [
// { required: true, message: "窗口英语名不能为空", trigger: "blur" },
// ],
// region: [
// { required: true, message: "窗口区域不能为空", trigger: "blur" },
// ],
// englishRegion: [
// { required: true, message: "窗口英语区域不能为空", trigger: "blur" },
// ],
fromnum: [ fromnum: [
{ required: true, validator: changeWindowNumber, trigger: "blur" }, { required: true, validator: changeWindowNumber, trigger: "blur" },
], ],
......
<template> <template>
<div>22</div> <div class="hall-window">
<div class="left">
<div class="header">
<h3 class="titel">大厅窗口</h3>
<div class="control">
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<div class="business-control">
<a-space>
<a-input-search
placeholder="请输入窗口名称搜索"
enter-button="搜索"
v-model="serchSiteBusiness"
@search="onSearchLeft"
allowClear
/>
</a-space>
</div>
</div>
</div>
<div class="table-content">
<!-- 表格 -->
<a-table
bordered
:loading="leftLoading"
size="middle"
:scroll="{ y: 550 }"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: leftCurrent,
total: leftTotal,
pageSize: leftSize,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changeLeft,
onShowSizeChange: showSizeChange,
}"
:columns="leftColumns"
:expandIconColumnIndex="2"
:data-source="businessData"
:row-selection="{
selectedRowKeys: selectedLeftRowKeys,
onChange: onSelectChange,
onSelect: onSelectLeftRow,
}"
:rowKey="(record) => record.id"
>
<template
slot="num"
v-if="record.parentId === 0"
slot-scope="text, record, index"
>
<span>
{{ (leftCurrent - 1) * leftSize + index + 1 }}
</span>
</template>
<template slot="businessName" slot-scope="text">
{{ text.businessName }}
</template>
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
>
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
</div>
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">站点窗口</h3>
<div class="control">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
</div>
<div class="business-control">
<a-input-search
placeholder="请输入窗口名称搜索"
enter-button="搜索"
v-model="serchData"
@search="onSearch"
allowClear
/>
</div>
</div>
</div>
<div class="table-content">
<!-- 表格 -->
<a-table
bordered
:scroll="{ y: 550 }"
:loading="rightLoading"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: rightCurrent,
total: rightTotal,
pageSize: rightSize,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changeRight,
onShowSizeChange: showSizeChangeRight,
}"
size="middle"
:expandIconColumnIndex="2"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onRightSelectChange,
}"
:columns="rightColumns"
:data-source="businessDataList"
:rowKey="(record) => record.id"
>
<template
v-if="record.parentId === 0"
slot="num"
slot-scope="text, record, index"
>
<span>
{{ (rightCurrent - 1) * rightSize + index + 1 }}
</span>
</template>
<template slot="name" slot-scope="text">
{{ text.name }}
</template>
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="jion" @click="handleIn(text.id)">加入</a>
<a
href="javascript:;"
class="delete"
@click="handleDelRight(+text.id)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
</div>
</div>
</template> </template>
<script> <script>
export default {}; import { getHallList } from "@/services/hall";
import local from "@/utils/local";
const leftColumns = [
{
title: "序号",
width: "50px",
scopedSlots: { customRender: "num" },
},
{
title: "窗口名称",
dataIndex: "windowName",
},
{
title: "所属大厅",
dataIndex: "hallName",
},
{
title: "创建时间",
dataIndex: "createTime",
},
{
title: "操作",
width: "110px",
scopedSlots: {
customRender: "action",
},
},
];
const rightColumns = [
{
title: "序号",
key: "id",
width: "50px",
scopedSlots: { customRender: "num" },
},
{
title: "窗口名称",
dataIndex: "name",
},
{
title: "编号",
dataIndex: "fromnum",
},
{
title: "所属部门",
dataIndex: "deptName",
},
{
title: "操作",
width: "110px",
scopedSlots: {
customRender: "action",
},
},
];
export default {
components: {},
data() {
return {
leftColumns,
rightColumns,
hallList: [], // 大厅列表
leftLoading: false,
rightLoading: false,
selectedRowKeys: [],
selectedLeftRowKeys: [],
visible: false,
leftCurrent: 1,
rightCurrent: 1,
leftTotal: 0,
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
siteId: local.getLocal("siteId"), // 站点id
};
},
created() {
this.getHallList();
},
methods: {
// 获取大厅列表
async getHallList() {
let res = await getHallList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.data.code == 1) {
let { data } = res.data.data;
this.hallList = data;
console.log(data);
}
},
// 左边搜索
onSearchLeft() {
this.leftCurrent = 1;
},
// 删除
handleDel() {
// let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {},
onCancel() {
console.log("Cancel");
},
});
},
// 左边选中
onSelectChange(key) {
this.selectedLeftRowKeys = key;
},
// 批量删除
handleDelAll() {
if (this.deleteData.length <= 0) {
this.$message.warning("请先勾选数据");
return;
}
},
// 获取批量加入id
onRightSelectChange(key) {
this.selectedRowKeys = key;
},
// 批量加入
handleAddAll() {},
// 左翻页
changeLeft(num) {
this.leftCurrent = num;
},
// 左边改变每页显示数量
showSizeChange(current, size) {
this.leftCurrent = current;
this.leftSize = size;
},
// 右翻页
changeRight(num) {
this.rightCurrent = num;
},
// 右边改变显示数量
showSizeChangeRight(current, size) {
this.rightCurrent = current;
this.rightSize = size;
},
// 编辑
async handleEdit() {},
// 搜索
async onSearch() {
this.rightCurrent = 1;
},
// 加入
async handleIn() {
if (!this.siteId) {
this.$message.warning("请先选择站点");
return;
}
},
// 删除-右
handleDelRight() {
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
maskClosable: true,
icon: "exclamation-circle",
async onOk() {},
onCancel() {
console.log("Cancel");
},
});
},
},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.hall-window {
width: 100%;
height: 100%;
display: flex;
position: relative;
&::after {
content: "";
width: 1px;
height: 100%;
position: absolute;
background-color: #eeeeee;
top: 0px;
left: 50%;
}
.left,
.right {
width: 50%;
.header {
height: 100px;
.titel {
margin-bottom: 15px;
}
}
}
.left {
padding-right: 15px;
}
.right {
padding-left: 15px;
}
.control {
width: 100%;
display: flex;
justify-content: space-between;
}
}
.add-btn {
background-color: #04cb8f;
color: #fff;
}
</style> </style>
\ No newline at end of file
...@@ -149,35 +149,35 @@ const options = { ...@@ -149,35 +149,35 @@ const options = {
}, },
], ],
}, },
{ // {
path: "hall", // path: "hall",
name: "大厅管理", // name: "大厅管理",
meta: { // meta: {
icon: "gateway", // icon: "gateway",
}, // },
component: () => import("@/pages/basicset/hall/Hall"), // component: () => import("@/pages/basicset/hall/Hall"),
redirect: "/hall/hallmanage", // redirect: "/hall/hallmanage",
children: [ // children: [
{ // {
path: "hallmanage", // path: "hallmanage",
name: "", // name: "",
component: () => // component: () =>
import("@/pages/basicset/hall/hallmanage/HallManage.vue"), // import("@/pages/basicset/hall/hallmanage/HallManage.vue"),
meta: { // meta: {
invisible: true, // invisible: true,
}, // },
}, // },
{ // {
path: "hallwindow", // path: "hallwindow",
name: "大厅窗口管理", // name: "大厅窗口管理",
meta: { // meta: {
invisible: true, // invisible: true,
}, // },
component: () => // component: () =>
import("@/pages/basicset/hall/hallwindow/HallWindow.vue"), // import("@/pages/basicset/hall/hallwindow/HallWindow.vue"),
}, // },
], // ],
}, // },
{ {
path: "personnel", path: "personnel",
name: "工作人员管理", name: "工作人员管理",
......
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