|
|
@@ -67,14 +67,14 @@
|
|
|
</el-form-item> -->
|
|
|
<el-form-item
|
|
|
label="状态"
|
|
|
- prop="is_open">
|
|
|
+ prop="isOpen">
|
|
|
<el-switch
|
|
|
:active-value="1"
|
|
|
:inactive-value="0"
|
|
|
- v-model="form.is_open"
|
|
|
+ v-model="form.isOpen"
|
|
|
></el-switch>
|
|
|
<span style="margin-left:5px">
|
|
|
- {{ form.is_open?'开放':'关闭' }}
|
|
|
+ {{ form.isOpen?'开放':'关闭' }}
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
name: '',
|
|
|
// day_check_limit: 99999999,
|
|
|
// peak_warning_num: 99999999,
|
|
|
- is_open: 1,
|
|
|
+ isOpen: 1,
|
|
|
parent_id: 1
|
|
|
// open_starttime: '08:00:00',
|
|
|
// open_endtime: '20:00:00',
|
|
|
@@ -130,27 +130,21 @@ export default {
|
|
|
updateScenic () {
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.form.open_starttime = '00:00:00'
|
|
|
- this.form.open_endtime = '23:59:59'
|
|
|
- this.form.open_starttime_weekend = '00:00:00'
|
|
|
- this.form.open_endtime_weekend = '23:59:59'
|
|
|
- this.form.open_starttime_holiday = '00:00:00'
|
|
|
- this.form.open_endtime_holiday = '23:59:59'
|
|
|
- if (this.dialogType === 'add') {
|
|
|
- createScenic(this.form).then(res => {
|
|
|
- this.$message.success('创建成功')
|
|
|
- this.handleClose()
|
|
|
- this.reset()
|
|
|
- this.$emit('updateList')
|
|
|
- })
|
|
|
- } else {
|
|
|
- updateScenic(this.form).then(res => {
|
|
|
- this.$message.success('更新成功')
|
|
|
- this.handleClose()
|
|
|
- this.reset()
|
|
|
- this.$emit('updateList')
|
|
|
- })
|
|
|
- }
|
|
|
+ // this.form.open_starttime = '00:00:00'
|
|
|
+ // this.form.open_endtime = '23:59:59'
|
|
|
+ // this.form.open_starttime_weekend = '00:00:00'
|
|
|
+ // this.form.open_endtime_weekend = '23:59:59'
|
|
|
+ // this.form.open_starttime_holiday = '00:00:00'
|
|
|
+ // this.form.open_endtime_holiday = '23:59:59'
|
|
|
+ const handler = this.dialogType === 'add' ? createScenic : updateScenic
|
|
|
+ const msg = this.dialogType === 'add' ? '创建' : '更新'
|
|
|
+
|
|
|
+ handler(this.form).then(res => {
|
|
|
+ this.$message.success(`${msg}成功`)
|
|
|
+ this.handleClose()
|
|
|
+ this.reset()
|
|
|
+ this.$emit('updateList')
|
|
|
+ })
|
|
|
} else {
|
|
|
console.log('error submit!!')
|
|
|
return false
|