提交 9dfff7ea 编写于 作者: 刘英杰's avatar 刘英杰

V20241021 系统配置/房间管理》默认开放时间更改为Table列表配置方式

上级 b890b21b
流水线 #30055 已通过 ,包含阶段
in 36 second
.ivu-modal-close .ivu-icon-ios-close[data-v-3d42d304]{color:red;font-weight:700}
\ No newline at end of file
[data-v-9459fae4] .ivu-drawer-mask{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(55,55,55,.6);height:100%;z-index:60000!important}[data-v-9459fae4] .ivu-drawer-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:60000!important;-webkit-overflow-scrolling:touch;outline:0}.ivu-form-item[data-v-9459fae4]{padding-right:15px}.fileRow[data-v-9459fae4]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-9459fae4]{color:#ed4014}.fileRow .delIcon[data-v-9459fae4]:hover{color:#f16643;cursor:pointer}.class-drawer[data-v-9459fae4]{height:"calc(100% - 55px)";overflow:"auto";padding-bottom:"53px";position:"static";z-index:99999!important}.class-drawer .subTitle[data-v-9459fae4]{margin-top:20px;font-size:14px;color:#191f25;font-weight:700}.class-drawer .drawer-footer[data-v-9459fae4]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.class-drawer[data-v-9459fae4] .ivu-drawer-header-inner{font-size:20px;font-weight:600}.searchDiv .ivu-form-item[data-v-28ca940a]{margin-bottom:12px}.searchDiv .buttonCol[data-v-28ca940a]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-28ca940a]{margin-left:8px} [data-v-32152d18] .ivu-drawer-mask{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(55,55,55,.6);height:100%;z-index:60000!important}[data-v-32152d18] .ivu-drawer-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:60000!important;-webkit-overflow-scrolling:touch;outline:0}.ivu-form-item[data-v-32152d18]{padding-right:15px}.fileRow[data-v-32152d18]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-32152d18]{color:#ed4014}.fileRow .delIcon[data-v-32152d18]:hover{color:#f16643;cursor:pointer}.class-drawer[data-v-32152d18]{height:"calc(100% - 55px)";overflow:"auto";padding-bottom:"53px";position:"static";z-index:99999!important}.class-drawer .subTitle[data-v-32152d18]{margin-top:20px;font-size:14px;color:#191f25;font-weight:700}.class-drawer .drawer-footer[data-v-32152d18]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.class-drawer[data-v-32152d18] .ivu-drawer-header-inner{font-size:20px;font-weight:600}.searchDiv .ivu-form-item[data-v-28ca940a]{margin-bottom:12px}.searchDiv .buttonCol[data-v-28ca940a]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-28ca940a]{margin-left:8px}
\ No newline at end of file \ No newline at end of file
.ivu-modal-close .ivu-icon-ios-close[data-v-363d7a66]{color:red;font-weight:700}
\ No newline at end of file
[data-v-9459fae4] .ivu-drawer-mask{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(55,55,55,.6);height:100%;z-index:60000!important}[data-v-9459fae4] .ivu-drawer-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:60000!important;-webkit-overflow-scrolling:touch;outline:0}.ivu-form-item[data-v-9459fae4]{padding-right:15px}.fileRow[data-v-9459fae4]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-9459fae4]{color:#ed4014}.fileRow .delIcon[data-v-9459fae4]:hover{color:#f16643;cursor:pointer}.class-drawer[data-v-9459fae4]{height:"calc(100% - 55px)";overflow:"auto";padding-bottom:"53px";position:"static";z-index:99999!important}.class-drawer .subTitle[data-v-9459fae4]{margin-top:20px;font-size:14px;color:#191f25;font-weight:700}.class-drawer .drawer-footer[data-v-9459fae4]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.class-drawer[data-v-9459fae4] .ivu-drawer-header-inner{font-size:20px;font-weight:600}.mainDiv[data-v-91d80ccc]{width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:space-between}.mainDiv .bigCard[data-v-91d80ccc],.mainDiv .smallCard[data-v-91d80ccc]{margin-bottom:16px}.mainDiv .bigCard[data-v-91d80ccc] .ivu-card-body,.mainDiv .smallCard[data-v-91d80ccc] .ivu-card-body{height:calc(100% - 51px)}.mainDiv .bigCard[data-v-91d80ccc] .ivu-card-body .ivu-form-item,.mainDiv .smallCard[data-v-91d80ccc] .ivu-card-body .ivu-form-item{margin-bottom:12px}.mainDiv .bigCard[data-v-91d80ccc]{width:calc(50% - 8px)}.mainDiv .smallCard[data-v-91d80ccc]{width:calc(33.33333% - 10.66667px)}.mainDiv[data-v-91d80ccc] .kjyyCard .ivu-card-body{overflow:auto}.mainDiv[data-v-91d80ccc] .kjyyCard .ivu-card-body p[name=fastCP]{display:flex;justify-content:space-between}.mainDiv[data-v-91d80ccc] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]{color:#ed4014}.mainDiv[data-v-91d80ccc] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:hover{color:#f16643}.mainDiv[data-v-91d80ccc] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:active{color:#e13d13}.mainDiv[data-v-91d80ccc] .cplhsCard .ivu-card-body{display:flex;flex-direction:column;justify-content:space-evenly}.mainDiv[data-v-91d80ccc] .save-bt{text-align:right;position:absolute;bottom:16px;right:16px}.mainDiv .roomOpeningHours[data-v-91d80ccc]{display:flex;justify-content:space-between;flex-wrap:wrap}.mainDiv .flexBetWeen[data-v-91d80ccc]{width:100%;height:100%;display:flex;justify-content:space-between}.class-drawer[data-v-91d80ccc]{height:"calc(100% - 55px)";overflow:"auto";padding-bottom:"53px";position:"static"}.class-drawer .subTitle[data-v-91d80ccc]{margin-top:20px;font-size:14px;color:#191f25;font-weight:700}.class-drawer .drawer-footer[data-v-91d80ccc]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.class-drawer[data-v-91d80ccc] .ivu-drawer-header-inner{font-size:20px;font-weight:600}
\ No newline at end of file
[data-v-32152d18] .ivu-drawer-mask{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(55,55,55,.6);height:100%;z-index:60000!important}[data-v-32152d18] .ivu-drawer-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:60000!important;-webkit-overflow-scrolling:touch;outline:0}.ivu-form-item[data-v-32152d18]{padding-right:15px}.fileRow[data-v-32152d18]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-32152d18]{color:#ed4014}.fileRow .delIcon[data-v-32152d18]:hover{color:#f16643;cursor:pointer}.class-drawer[data-v-32152d18]{height:"calc(100% - 55px)";overflow:"auto";padding-bottom:"53px";position:"static";z-index:99999!important}.class-drawer .subTitle[data-v-32152d18]{margin-top:20px;font-size:14px;color:#191f25;font-weight:700}.class-drawer .drawer-footer[data-v-32152d18]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.class-drawer[data-v-32152d18] .ivu-drawer-header-inner{font-size:20px;font-weight:600}.mainDiv[data-v-463b27da]{width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:space-between}.mainDiv .bigCard[data-v-463b27da],.mainDiv .smallCard[data-v-463b27da]{margin-bottom:16px}.mainDiv .bigCard[data-v-463b27da] .ivu-card-body,.mainDiv .smallCard[data-v-463b27da] .ivu-card-body{height:calc(100% - 51px)}.mainDiv .bigCard[data-v-463b27da] .ivu-card-body .ivu-form-item,.mainDiv .smallCard[data-v-463b27da] .ivu-card-body .ivu-form-item{margin-bottom:12px}.mainDiv .bigCard[data-v-463b27da]{width:calc(50% - 8px)}.mainDiv .smallCard[data-v-463b27da]{width:calc(33.33333% - 10.66667px)}.mainDiv[data-v-463b27da] .kjyyCard .ivu-card-body{overflow:auto}.mainDiv[data-v-463b27da] .kjyyCard .ivu-card-body p[name=fastCP]{display:flex;justify-content:space-between}.mainDiv[data-v-463b27da] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]{color:#ed4014}.mainDiv[data-v-463b27da] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:hover{color:#f16643}.mainDiv[data-v-463b27da] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:active{color:#e13d13}.mainDiv[data-v-463b27da] .cplhsCard .ivu-card-body{display:flex;flex-direction:column;justify-content:space-evenly}.mainDiv[data-v-463b27da] .save-bt{text-align:right;position:absolute;bottom:16px;right:16px}.mainDiv .roomOpeningHours[data-v-463b27da]{display:flex;justify-content:space-between;flex-wrap:wrap}.mainDiv .flexBetWeen[data-v-463b27da]{width:100%;height:100%;display:flex;justify-content:space-between}.class-drawer[data-v-463b27da]{height:"calc(100% - 55px)";overflow:"auto";padding-bottom:"53px";position:"static"}.class-drawer .subTitle[data-v-463b27da]{margin-top:20px;font-size:14px;color:#191f25;font-weight:700}.class-drawer .drawer-footer[data-v-463b27da]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.class-drawer[data-v-463b27da] .ivu-drawer-header-inner{font-size:20px;font-weight:600}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href=favicon.ico><title>自习室占座预约系统</title><link href=css/chunk-vendors.cc1990b1.css rel=stylesheet><link href=css/app.f8f860e0.css rel=stylesheet></head><body><script charset=utf-8 src="https://map.qq.com/api/js?v=2.exp&key=ZNMBZ-NYOEO-WNMWL-SJF4C-MWKQT-KJB7W&libraries=drawing,geometry,place,convertor,visualization"></script><script src=https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js></script><script src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=ZNMBZ-NYOEO-WNMWL-SJF4C-MWKQT-KJB7W"></script><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 自习室占座预约系统。</strong></noscript><div id=app></div><script src=js/chunk-vendors.6916cc08.js></script><script src=js/app.68f4966e.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href=favicon.ico><title>自习室占座预约系统</title><link href=css/chunk-vendors.cc1990b1.css rel=stylesheet><link href=css/app.f8f860e0.css rel=stylesheet></head><body><script charset=utf-8 src="https://map.qq.com/api/js?v=2.exp&key=ZNMBZ-NYOEO-WNMWL-SJF4C-MWKQT-KJB7W&libraries=drawing,geometry,place,convertor,visualization"></script><script src=https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js></script><script src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=ZNMBZ-NYOEO-WNMWL-SJF4C-MWKQT-KJB7W"></script><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 自习室占座预约系统。</strong></noscript><div id=app></div><script src=js/chunk-vendors.6916cc08.js></script><script src=js/app.6268263d.js></script></body></html>
\ No newline at end of file \ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -19,11 +19,13 @@ ...@@ -19,11 +19,13 @@
<Row style="margin-bottom: 10px"> <Row style="margin-bottom: 10px">
<Col v-for="(item,index) in formDataTimeTable.time" :key="index" span="24" <Col v-for="(item,index) in formDataTimeTable.time" :key="index" span="24"
style="margin-bottom: 10px;display: flex;align-items: center"> style="margin-bottom: 10px;display: flex;align-items: center">
<TimePicker v-model="item.begin" :editable="false" confirm format="HH:mm" placeholder="未设置" <!-- <TimePicker v-model="item.begin" :editable="false" confirm format="HH:mm" placeholder="未设置"
size="default" style="width: 120px"></TimePicker> size="default" style="width: 120px"></TimePicker>
&nbsp; 至 &nbsp; &nbsp; 至 &nbsp;
<TimePicker v-model="item.end" :editable="false" confirm format="HH:mm" placeholder="未设置" <TimePicker v-model="item.end" :editable="false" confirm format="HH:mm" placeholder="未设置"
size="default" style="width: 120px"></TimePicker> size="default" style="width: 120px"></TimePicker>-->
<TimePicker v-model="item.timeRange" format="HH:mm" placeholder="未设置" placement="bottom-end"
style="width: 240px" type="timerange"/>
&nbsp;可预约座位 &nbsp;可预约座位
<div style="margin-left: auto"> <div style="margin-left: auto">
<Poptip <Poptip
...@@ -53,7 +55,6 @@ ...@@ -53,7 +55,6 @@
</div> </div>
</Drawer> </Drawer>
<Modal <Modal
v-model="show" v-model="show"
...@@ -193,12 +194,12 @@ ...@@ -193,12 +194,12 @@
<Row v-if="!isDetails && !!formItem.filter(cur=>cur.type === 'timeTable').length"> <Row v-if="!isDetails && !!formItem.filter(cur=>cur.type === 'timeTable').length">
<FormItem v-for="(item,index) in formItem.filter(cur=>cur.type === 'timeTable')" :key="item.id" <FormItem v-for="(item,index) in formItem.filter(cur=>cur.type === 'timeTable')" :key="item.id"
label="默认开放区间"> label="默认开放区间">
<Table :key="item.id" :columns="item.columns" :data="item.data" border size="small"> <Table :key="aaa" :columns="item.columns" :data="item.data" border size="small">
<template slot="time" slot-scope="{ row, index }"> <template slot="time" slot-scope="{ row, index }">
<span v-for="(item,inde) in row.time" :key="inde" <span v-for="(item,inde) in row.time" :key="inde"
style="margin-right: 5px">时间{{ inde + 1 }}:{{ item }};</span> style="margin-right: 5px">时间{{ inde + 1 }}:{{ item }};</span>
</template> </template>
<template slot="action" slot-scope="{ row, index }"> <template #action="{ row, index }">
<a @click="openClass(row, index,item)">配置开放时间</a> <a @click="openClass(row, index,item)">配置开放时间</a>
</template> </template>
</Table> </Table>
...@@ -279,7 +280,7 @@ ...@@ -279,7 +280,7 @@
</template> </template>
<script> <script>
import {cloneDeep} from 'lodash' import _, {cloneDeep} from 'lodash'
export default { export default {
props: { props: {
...@@ -308,6 +309,7 @@ export default { ...@@ -308,6 +309,7 @@ export default {
}, },
data() { data() {
return { return {
aaa:123123,
// Modal显示value // Modal显示value
show: this.value, show: this.value,
modalTitle: '编辑', modalTitle: '编辑',
...@@ -330,7 +332,6 @@ export default { ...@@ -330,7 +332,6 @@ export default {
peopleKey: '',//select 搜索文字 peopleKey: '',//select 搜索文字
regionDot: [],// 坐标范围 regionDot: [],// 坐标范围
//timeTable //timeTable
showDrawer: false, showDrawer: false,
formDataTimeTable: { formDataTimeTable: {
...@@ -343,20 +344,57 @@ export default { ...@@ -343,20 +344,57 @@ export default {
}, },
computed: {}, computed: {},
created() { created() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
save() { save() {
//保存时间配置 剩下保存后刷新列表数据和格式化为提交数据 //深拷贝,防止污染 1~7天的数据
this.formData[this.formDataTimeTable.id] = this.formDataTimeTable; let array = _.cloneDeep(this.formItem.find(cur=>cur.type ==='timeTable').data);
console.log("🚀🚀this.formDataTimeTable🚀,", this.formDataTimeTable);
function getFormatData(data) {
//获取开放时间段,格式化
return data.map(cur => {
return cur.timeRange.join('~');
})
}
let info = {
//策略判断日期,把数据分配给对应日期,最后保存
'周一': () => array[0].time = getFormatData(this.formDataTimeTable.time),
'周二': () => array[1].time = getFormatData(this.formDataTimeTable.time),
'周三': () => array[2].time = getFormatData(this.formDataTimeTable.time),
'周四': () => array[3].time = getFormatData(this.formDataTimeTable.time),
'周五': () => array[4].time = getFormatData(this.formDataTimeTable.time),
'周六': () => array[5].time = getFormatData(this.formDataTimeTable.time),
'周日': () => array[6].time = getFormatData(this.formDataTimeTable.time),
}
info[this.formDataTimeTable.day]();
this.formItem.find(cur=>cur.type ==='timeTable').data = array; //Table列表输出
let data = {
//格式化数据,
"one": array[0].time,
"two": array[1].time,
"three": array[2].time,
"four": array[3].time,
"five": array[4].time,
"six": array[5].time,
"seven": array[6].time,
};
this.formData['service_interval_time'] = JSON.stringify(data) //格式化为后端接口格式
this.formData['service_interval_time_info'] =data //格式化为后端接口格式
// timeTable
this.showDrawer = false; this.showDrawer = false;
}, },
openClass(row, index, item) { openClass(row, index, item) {
//触发配置时间 //触发配置时间
console.log("🚀🚀openClass,", row, index) console.log("🚀🚀openClass,", row, index)
this.formDataTimeTable = { this.formDataTimeTable = {
// 某天的时间
...row, ...row,
id: item.id, id: item.id,
index, index,
...@@ -364,6 +402,7 @@ export default { ...@@ -364,6 +402,7 @@ export default {
return { return {
begin: cur.split('~')[0], begin: cur.split('~')[0],
end: cur.split('~')[1], end: cur.split('~')[1],
timeRange: [cur.split('~')[0], cur.split('~')[1]]
} }
}) })
} }
...@@ -477,6 +516,7 @@ export default { ...@@ -477,6 +516,7 @@ export default {
let id = this.formItem[tri].id let id = this.formItem[tri].id
obj[id] = obj[id].join('-') obj[id] = obj[id].join('-')
} }
console.log("🚀🚀obj🚀,",obj)
this.$emit('onSubmit', obj) this.$emit('onSubmit', obj)
} else { } else {
this.$Message.warning('请检查输入项') this.$Message.warning('请检查输入项')
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</template> </template>
<div style="position: absolute ;bottom: 10px;width: 100%;"> <div style="position: absolute ;bottom: 10px;width: 100%;">
<div style="display: flex;width:100%;height: 50px; justify-content: center;align-items: center;"> <div style="display: flex;width:100%;height: 50px; justify-content: center;align-items: center;">
<span style="font-size: 12px;">v1.0.1</span> <span style="font-size: 12px;">v1.0.2</span>
</div> </div>
</div> </div>
</Menu> </Menu>
......
...@@ -15,10 +15,10 @@ export default { ...@@ -15,10 +15,10 @@ export default {
}, },
data() { data() {
return { return {
openTime:{ openTime: {
show:false, show: false,
data:[], data: [],
columns:[ columns: [
{title: '工作日', width: 100, key: 'day'}, {title: '工作日', width: 100, key: 'day'},
{ {
title: '开放时间段', title: '开放时间段',
...@@ -99,27 +99,17 @@ export default { ...@@ -99,27 +99,17 @@ export default {
require: false, require: false,
columns: [ columns: [
{title: '工作日', width: 100, key: 'day'}, {title: '工作日', width: 100, key: 'day'},
{ {title: '开放时间段', slot: 'time', minWidth: 410,},
title: '开放时间段', {title: ' ', slot: 'action', width: 140},
slot: 'time',
minWidth: 410,
},
{title: ' ', slot: 'action',width: 140}
], ],
data: [ data: [
{day: '周一', time: '未配置开放时间'}, {day: '周一', time: ''},
{day: '周二', time: '未配置开放时间'}, {day: '周二', time: ''},
{ {day: '周三', time: ''},
day: '周三', {day: '周四', time: ''},
time: '未配置开放时间' {day: '周五', time: ''},
}, {day: '周六', time: ''},
{day: '周四', time: '未配置开放时间'}, {day: '周日', time: ''}
{day: '周五', time: '未配置开放时间'},
{
day: '周六',
time: '未配置开放时间'
},
{day: '周日', time: '未配置开放时间'}
], ],
optList: [] optList: []
}, },
...@@ -138,7 +128,7 @@ export default { ...@@ -138,7 +128,7 @@ export default {
}], }],
}, },
defaultFormData: { defaultFormData: {
"timeTable":{}, "timeTable": {},
"room_name": "", "room_name": "",
"room_type_id": "", "room_type_id": "",
"room_type_name": "", "room_type_name": "",
...@@ -290,7 +280,7 @@ export default { ...@@ -290,7 +280,7 @@ export default {
/** /**
* 默认开放时间 * 默认开放时间
* */ * */
showOpenTime(row){ showOpenTime(row) {
//查看开放时间 //查看开放时间
let info = { let info = {
'one': '周一', 'one': '周一',
...@@ -301,17 +291,8 @@ export default { ...@@ -301,17 +291,8 @@ export default {
'six': '周六', 'six': '周六',
'seven': '周日', 'seven': '周日',
} }
let data = { let data = eval("(" + row.service_interval_time + ")");
"one": ["8:00~13:00", "14:00~18:00"], this.openTime.data = [
"two": [],
"three": [],
"four": [],
"five": ["8:00~13:00", "14:00~18:00"],
"six": [],
"seven": [],
}
// let data = eval("(" + row.service_interval_time + ")");
this.openTime.data = [
{day: info['one'], time: data['one']}, {day: info['one'], time: data['one']},
{day: info['two'], time: data['two']}, {day: info['two'], time: data['two']},
{day: info['three'], time: data['three']}, {day: info['three'], time: data['three']},
...@@ -320,11 +301,11 @@ export default { ...@@ -320,11 +301,11 @@ export default {
{day: info['six'], time: data['six']}, {day: info['six'], time: data['six']},
{day: info['seven'], time: data['seven']} {day: info['seven'], time: data['seven']}
] ]
this.$forceUpdate();
this.openTime.show = true this.openTime.show = true
}, },
defaultOpeningHours() { defaultOpeningHours(noFormatData) {
//获取默认开放时间 //获取默认开放时间 列表数据
let info = { let info = {
'one': '周一', 'one': '周一',
'two': '周二', 'two': '周二',
...@@ -334,15 +315,17 @@ export default { ...@@ -334,15 +315,17 @@ export default {
'six': '周六', 'six': '周六',
'seven': '周日', 'seven': '周日',
} }
let data = { let data = eval("(" + noFormatData + ")");
"one": ["8:00~13:00", "14:00~18:00"], //
"two": [], /*{
"three": [], "one": ["8:00~13:00", "14:00~18:00"],
"four": [], "two": [],
"five": ["8:00~13:00", "14:00~18:00"], "three": [],
"six": [], "four": [],
"seven": [], "five": ["8:00~13:00", "14:00~18:00"],
} "six": [],
"seven": [],
}*/
this.formItem[this.formItem.findIndex(a => a.id === 'timeTable')].data = [ this.formItem[this.formItem.findIndex(a => a.id === 'timeTable')].data = [
{day: info['one'], time: data['one']}, {day: info['one'], time: data['one']},
{day: info['two'], time: data['two']}, {day: info['two'], time: data['two']},
...@@ -352,7 +335,6 @@ export default { ...@@ -352,7 +335,6 @@ export default {
{day: info['six'], time: data['six']}, {day: info['six'], time: data['six']},
{day: info['seven'], time: data['seven']} {day: info['seven'], time: data['seven']}
] ]
}, },
/** /**
* 默认开放时间 * 默认开放时间
...@@ -361,7 +343,7 @@ export default { ...@@ -361,7 +343,7 @@ export default {
//获取系统配置活动和分割时间 //获取系统配置活动和分割时间
api.getApiSysConfigGetSysConfigAll().then(res => { api.getApiSysConfigGetSysConfigAll().then(res => {
res.response.forEach(cur => { res.response.forEach(cur => {
if (cur.id === 'service_interval_time_occupyseat') this.defaultFormData.service_interval_time = cur.value.split('-'); if (cur.id === 'service_interval_time_occupyseat') this.defaultFormData.service_interval_time = cur.value;
if (cur.id === 'time_split_occupyseat') this.defaultFormData.time_split = cur.value if (cur.id === 'time_split_occupyseat') this.defaultFormData.time_split = cur.value
}) })
}) })
...@@ -653,17 +635,13 @@ export default { ...@@ -653,17 +635,13 @@ export default {
//默认开放时间 //默认开放时间
this.formItem[this.formItem.findIndex(a => a.id === 'timeTable')].columns = [ this.formItem[this.formItem.findIndex(a => a.id === 'timeTable')].columns = [
{title: '工作日', width: 100, key: 'day'}, {title: '工作日', width: 100, key: 'day'},
{ {title: '开放时间段', slot: 'time', minWidth: 410,},
title: '开放时间段', {title: ' ', slot: 'action', width: 110}
slot: 'time',
minWidth: 410,
},
{title: ' ', slot: 'action',width: 110}
] ]
this.defaultOpeningHours(); this.defaultOpeningHours(this.defaultFormData.service_interval_time);
// //
this.flag = 'add'
this.flag = 'add';
this.$refs.ceditmodal.regionDot = []; this.$refs.ceditmodal.regionDot = [];
this.regionDot = [ this.regionDot = [
{lat: 19.984440261076596, lng: 110.3360903263092}, {lat: 19.984440261076596, lng: 110.3360903263092},
...@@ -685,7 +663,9 @@ export default { ...@@ -685,7 +663,9 @@ export default {
}, },
] ]
this.defaultOpeningHours(); this.$forceUpdate()
this.defaultOpeningHours(row.service_interval_time);
// //
...@@ -713,30 +693,23 @@ export default { ...@@ -713,30 +693,23 @@ export default {
//默认开放时间 //默认开放时间
this.formItem[this.formItem.findIndex(a => a.id === 'timeTable')].columns = [ this.formItem[this.formItem.findIndex(a => a.id === 'timeTable')].columns = [
{title: '工作日', width: 100, key: 'day'}, {title: '工作日', width: 100, key: 'day'},
{ {title: '开放时间段', slot: 'time', minWidth: 410,},
title: '开放时间段', {title: ' ', slot: 'action', width: 110}
slot: 'time',
minWidth: 410,
},
{title: ' ', slot: 'action',width: 110}
] ]
this.defaultOpeningHours(); this.$refs.ceditmodal.aaa ++
this.defaultOpeningHours(row.service_interval_time);
// //
this.flag = 'edit' this.flag = 'edit'
// console.log('编辑行', row) // console.log('编辑行', row)
this.editModalshow = true this.editModalshow = true
this.editModalLoading = true this.editModalLoading = true
return this.asc.getApiRoomGetRoomInfo({id: row.room_id}).then(res => { return this.asc.getApiRoomGetRoomInfo({id: row.room_id}).then(res => {
// console.log('编辑详情', res) // console.log('编辑详情', res)
/** /**
* 其他项目使用可不使用 * 其他项目使用可不使用
* */ * */
if (res.response.attendance_area_list == null) res.response.attendance_area_list = [] if (res.response.attendance_area_list == null) res.response.attendance_area_list = [];
this.regionDot = res.response.attendance_area_list this.regionDot = res.response.attendance_area_list
this.$refs.ceditmodal.regionDot = this.regionDot; //赋值给子组件 this.$refs.ceditmodal.regionDot = this.regionDot; //赋值给子组件
//11 //11
...@@ -891,7 +864,7 @@ export default { ...@@ -891,7 +864,7 @@ export default {
<template #service_interval_time="{ row }"> <template #service_interval_time="{ row }">
<a @click="showOpenTime(row)"> 查看</a> <a @click="showOpenTime(row)"> 查看</a>
<!-- <span v-for="(item,inde) in row.service_interval_time" :key="inde" style="margin-right: 5px">时间{{ inde + 1 }}:{{ item }};</span>--> <!-- <span v-for="(item,inde) in row.service_interval_time" :key="inde" style="margin-right: 5px">时间{{ inde + 1 }}:{{ item }};</span>-->
</template> </template>
<template #roomQrCode="{ row }"> <template #roomQrCode="{ row }">
<img height="40px" src="@/assets/images/二维码.png" style="cursor: pointer" width="40px" <img height="40px" src="@/assets/images/二维码.png" style="cursor: pointer" width="40px"
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
function getFormatData(data) { function getFormatData(data) {
//获取开放时间段,格式化 //获取开放时间段,格式化
return data.map(cur => { return data.map(cur => {
return cur.timeRange.join('~') return cur.timeRange.join('~');
}) })
} }
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
'six': '周六', 'six': '周六',
'seven': '周日', 'seven': '周日',
} }
let data = eval("(" + noFormatData + ")") let data = eval("(" + noFormatData + ")");
/*{ /*{
"one": ["8:00~13:00", "14:00~18:00"], "one": ["8:00~13:00", "14:00~18:00"],
"two": [], "two": [],
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或