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

feat:新增无人值守设置

parent b2c3e441
......@@ -41,6 +41,7 @@ export default {
methods: {
onChange(checked) {
this.$emit("change", checked ? 1 : 0);
this.$emit("onChange", checked ? 1 : 0);
},
},
};
......
......@@ -192,9 +192,16 @@ export default {
onSelectRow(record, selected) {
if (selected && record.children && record.children.length) {
record.children.forEach((v) => {
this.rowKeys = [...new Set([...this.rowKeys,v.id])]
this.rowKeys = [...new Set([...this.rowKeys, v.id])];
});
} else if(!selected) {
} else if (!selected && record.children && record.children.length) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id);
record.children.forEach((v) => {
this.rowKeys = this.rowKeys.filter((val) => val != v.id);
});
} else if (selected && record.parentId) {
this.rowKeys = [...new Set([...this.rowKeys, record.parentId])];
} else if (!selected) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id);
}
},
......
......@@ -5,6 +5,7 @@
:visible="Visible"
@cancel="handleClose"
:maskClosable="false"
:destroyOnClose="true"
>
<a-form-model
ref="formData"
......@@ -43,20 +44,6 @@
{{ v.name }}</a-select-option
>
</a-select>
<!-- <a-select
placeholder="请选择部门"
v-model="form.deptId"
@change="handleChange"
>
<a-select-option
:data-deptNum="v.deptNumber"
v-for="v in deptList"
:key="v.id"
:value="v.id"
>
{{ v.name }}
</a-select-option>
</a-select> -->
</a-form-model-item>
</a-col>
</a-row>
......@@ -96,14 +83,43 @@
<a-input v-model="form.fromnum" placeholder="请输入窗口编号" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="红旗窗口" prop="hongqi">
<y-switch v-model="form.hongqi"></y-switch>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col span="12">
<a-form-model-item label="无人值守" prop="duty">
<y-switch v-model="form.duty" @onChange="changeDuty"></y-switch>
<a-tooltip>
<template slot="title">
该功能用于窗口无工作人员入驻,无需叫号、评价的情况下,定义窗口屏显示内容。
</template>
<a-icon class="question-icon" type="question-circle" />
</a-tooltip>
</a-form-model-item>
</a-col>
</a-row>
<a-row v-if="form.duty">
<a-col :span="12">
<a-form-model-item label="显示内容" prop="dutyContent">
<a-input
v-model="form.dutyContent"
placeholder="请输入窗口屏显示内容"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="显示英文" prop="dutyEnglish">
<a-input
v-model="form.dutyEnglish"
placeholder="请输入窗口屏显示英文"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item
......@@ -205,6 +221,9 @@ export default {
summary: "", // 备注
building: 1, // 楼栋
level: 1, // 楼层
duty: "", // 无人值守
dutyContent: "", // 无人值守显示内容
dutyEnglish: "", // 无人值守显示英文内容
},
rules: {
siteName: [
......@@ -302,11 +321,24 @@ export default {
this.$refs.formData.resetFields();
this.Visible = false;
},
// 改变无人值守
changeDuty(val) {
if (!val) {
this.form.dutyContent = "";
this.form.dutyEnglish = "";
}
},
},
};
</script>
<style lang="less" scoped>
.question-icon {
margin-left: 10px;
font-size: 20px;
cursor: pointer;
color: #999;
}
/deep/.ant-modal-content {
width: 800px;
}
......@@ -321,4 +353,4 @@ export default {
/deep/.ant-form-explain {
position: absolute;
}
</style>
\ No newline at end of file
</style>
......@@ -53,6 +53,7 @@ import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue";
import SampleFormSkin from "../sampleFormSkin/SampleFormSkin.vue";
import WriteFormSkin from "../writeFormSkin/WriteFormSkin.vue";
import InformationSkin from "../informationskin/InformationSkin.vue";
import SelfService from "../selfservice/SelfService.vue";
export default {
components: {
LandscapeMode,
......@@ -63,6 +64,7 @@ export default {
SampleFormSkin,
WriteFormSkin,
InformationSkin,
SelfService,
},
props: {},
data() {
......@@ -76,40 +78,41 @@ export default {
this.$bus.$on("selectPreview", (row, index) => {
this.skinInfo = { ...row };
this.index = index;
console.log(this.skinInfo);
});
},
computed: {
component() {
let str = "";
switch (this.skinInfo.productId) {
case 1:
switch (this.skinInfo.productName) {
case "排号机":
str = "LandscapeMode";
break;
case 2:
case "窗口屏":
str = "WindowSkin";
break;
case 3:
case "呼叫器":
str = "CallOutSkin";
break;
case 4:
case "集中显示屏":
str = "CentralizeSkin";
break;
case 5:
case "导视机":
// str = "CentralizeSkin";
break;
case 6:
case "评价器":
str = "AppraiseSkin";
break;
case 7:
// str = "AppraiseSkin";
case "自助服务终端":
str = "SelfService";
break;
case 8:
case "填单机":
str = "WriteFormSkin";
break;
case 9:
case "样表机":
str = "SampleFormSkin";
break;
case 10:
case "信息发布终端":
str = "InformationSkin";
break;
}
......
......@@ -187,6 +187,7 @@ import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue";
import SampleFormSkin from "../sampleFormSkin/SampleFormSkin.vue";
import WriteFormSkin from "../writeFormSkin/WriteFormSkin.vue";
import InformationSkin from "../informationskin/InformationSkin.vue";
import SelfService from "../selfservice/SelfService.vue"
import { uploadFile, skinSave, getTemplateList } from "@/services/surface";
import html2canvas from "html2canvas";
import { Empty } from "ant-design-vue";
......@@ -201,6 +202,7 @@ export default {
SampleFormSkin,
WriteFormSkin,
InformationSkin,
SelfService
},
props: {
isShow: {
......@@ -282,7 +284,7 @@ export default {
str = "AppraiseSkin";
break;
case "自助服务终端":
// str = "AppraiseSkin";
str = "SelfService";
break;
case "填单机":
str = "WriteFormSkin";
......
<template>
<div class="skin-box">
<!-- 自助服务终端 横板 -->
<div
:id="conponentsId"
v-if="imageResolution === '1'"
class="across-skin flex flexc aic"
:style="{
background: filterItem('1', 0),
}"
>
<!-- 头部 -->
<div class="header flex aic jcb">
<div class="left flex aic">
<div
class="title"
:style="{
color: filterItem('2', 0),
}"
>
自助服务终端
</div>
</div>
<div
class="right flex aic"
:style="{
color: filterItem('3', 0),
}"
>
<div class="time">10:32</div>
<div class="flex flexc">
<span>2023/02/16</span>
<span>星期四</span>
</div>
</div>
</div>
<div class="main flex aic jcb flex1">
<div class="left">
<div class="top">
<div class="search-box">
<div class="search">请输入你想查询的内容关键字</div>
<div
class="search_btn"
:style="{
color: filterItem('7', 0),
background: filterItem('8', 0),
}"
>
搜索
</div>
</div>
<div class="banner flex aic jcc">banner</div>
</div>
<div class="bottom">新闻区</div>
</div>
<div class="right flex aic jcc">应用展示区</div>
</div>
<!-- 底部 -->
<div class="footer mt20">
<div
class="footer-item footer-item1"
:style="{
background: filterItem('7', 0),
}"
>
首页
</div>
<div class="footer-item">服务</div>
<div class="footer-item">互动</div>
<div class="footer-item">我的</div>
<div
class="footer-item footer-item5"
:style="{
color: filterItem('7', 0),
background: filterItem('8', 0),
}"
>
登录/注册
</div>
</div>
</div>
<!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else>
<a-empty
:image="require('../../../../assets/img/original.png')"
:image-style="{
height: '80px',
}"
>
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty>
</div>
</div>
</template>
<script>
export default {
props: {
skinFieldList: {
type: Array,
required: true,
default: () => {
return [];
},
},
imageResolution: {
required: true,
default: "1",
},
conponentsId: {
required: true,
type: String,
},
},
data() {
return {
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
// 过滤属性类型
filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
if (arr.length) {
return this.filterValueType(arr[index]);
} else {
return "";
}
},
// 过滤属性值类型
filterValueType(info = {}) {
let value = "";
if (info.fieldType !== "" && info.fieldType === "1" && info.fieldValue) {
value = info.fieldValue;
} else if (
info.fieldType !== "" &&
info.fieldType === "2" &&
info.fieldValue
) {
value = `url(${this.api + info.fieldValue})`;
}
return value;
},
},
};
</script>
<style lang="less" scoped>
.across-skin {
width: 1000px;
height: 562.5px;
background: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important ;
background-position: center !important ;
background-size: cover !important ;
.header {
width: 100%;
color: #fff;
padding: 20px;
.title {
font-size: 30px;
font-weight: 600;
}
.right {
.time {
font-size: 26px;
font-weight: 600;
margin-right: 10px;
}
}
}
.main {
width: 100%;
padding: 20px;
margin-top: 10px;
color: #fff;
.left {
width: 39%;
height: 100%;
padding: 10px;
border-radius: 4px;
border: 1px dashed #ececec;
.top {
height: 59%;
display: flex;
flex-direction: column;
.search-box {
height: 40px;
padding: 0px 4px;
margin-bottom: 10px;
border-radius: 4px;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
.search {
color: #ccc;
}
.search_btn {
width: 60px;
height: 36px;
border-radius: 4px;
background-color: #dee9ff;
display: flex;
justify-content: center;
align-items: center;
color: #206eff;
}
}
.banner {
flex: 0.9;
border: 1px dashed #ececec;
border-radius: 4px;
}
}
.bottom {
height: 39%;
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed #ececec;
}
}
.right {
width: 59%;
height: 100%;
border-radius: 4px;
border: 1px dashed #ececec;
}
}
.footer {
width: 100%;
height: 60px;
display: flex;
justify-content: flex-end;
background-color: #fff;
.footer-item1 {
color: #fff;
background-color: #206eff;
}
.footer-item {
display: flex;
align-items: center;
justify-content: center;
width: 160px;
height: 100%;
border-left: 1px solid #ececec;
border-right: 1px solid #ececec;
font-size: 20px;
}
.footer-item5 {
color: #206eff;
background-color: #dee9ff;
}
}
}
</style>
\ No newline at end of file
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