|
|
@ -85,19 +85,19 @@ |
|
|
|
<el-form-item |
|
|
|
v-if="form.open_setting === 2" |
|
|
|
:class="{'weekly_margin': form.open_setting === 2}" |
|
|
|
prop="openweekly" |
|
|
|
prop="open_weekly" |
|
|
|
:rules="[ |
|
|
|
{ required: true, message: '请选择每周开机时间', trigger: 'change' }, |
|
|
|
]" |
|
|
|
> |
|
|
|
<el-checkbox-group v-model="openweekly"> |
|
|
|
<el-checkbox label="周一" name="openweekly" /> |
|
|
|
<el-checkbox label="周二" name="openweekly" /> |
|
|
|
<el-checkbox label="周三" name="openweekly" /> |
|
|
|
<el-checkbox label="周四" name="openweekly" /> |
|
|
|
<el-checkbox label="周五" name="openweekly" /> |
|
|
|
<el-checkbox label="周六" name="openweekly" /> |
|
|
|
<el-checkbox label="周日" name="openweekly" /> |
|
|
|
<el-checkbox-group v-model="open_weekly"> |
|
|
|
<el-checkbox label="周一" name="open_weekly" /> |
|
|
|
<el-checkbox label="周二" name="open_weekly" /> |
|
|
|
<el-checkbox label="周三" name="open_weekly" /> |
|
|
|
<el-checkbox label="周四" name="open_weekly" /> |
|
|
|
<el-checkbox label="周五" name="open_weekly" /> |
|
|
|
<el-checkbox label="周六" name="open_weekly" /> |
|
|
|
<el-checkbox label="周日" name="open_weekly" /> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
@ -196,8 +196,9 @@ |
|
|
|
class="avatar-uploader" |
|
|
|
action="" |
|
|
|
:show-file-list="false" |
|
|
|
:on-success="handleAvatarSuccess"> |
|
|
|
<img v-if="form.startup_screen" :src="form.startup_screen" class="avatar"> |
|
|
|
:on-success="handleAvatarSuccess" |
|
|
|
> |
|
|
|
<img v-if="form.startup_screen" :src="form.startup_screen" class="avatar" /> |
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
</el-upload> |
|
|
|
<!-- <el-dialog :visible.sync="dialogVisible"> |
|
|
@ -221,6 +222,11 @@ import {reqStartUpList,reqEditStartUp} from '@/api/device/startUpList.js' |
|
|
|
import { parseTime } from '@/utils/index.js' |
|
|
|
export default { |
|
|
|
name: 'DeviceConfig', |
|
|
|
filters: { |
|
|
|
parseTime(time, cFormat) { |
|
|
|
return parseTime(time, cFormat) |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
query: { |
|
|
@ -244,10 +250,10 @@ export default { |
|
|
|
open_time: '', // 具体的开机时间 |
|
|
|
close_time: '', // 具体的关机时间 |
|
|
|
startup_screen: '', // 启动画面的图片 |
|
|
|
open_weekly:[], |
|
|
|
close_weekly:[] |
|
|
|
open_weekly: [] |
|
|
|
// close_weekly: [] |
|
|
|
}, |
|
|
|
openweekly:[], |
|
|
|
open_weekly: [], |
|
|
|
closeweekly: [], |
|
|
|
addFromVisible: false, |
|
|
|
selectedList: [], |
|
|
@ -255,11 +261,6 @@ export default { |
|
|
|
deviceData: [{ key: '0', name: '竖屏' }, { key: '1', name: '横屏' }] |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
parseTime(time, cFormat) { |
|
|
|
return parseTime(time, cFormat) |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
watch: {}, |
|
|
|
mounted() { |
|
|
@ -290,13 +291,13 @@ export default { |
|
|
|
// } |
|
|
|
// this.offweek=row.close_weekly |
|
|
|
// this.onweek=row.open_weekly |
|
|
|
|
|
|
|
}, |
|
|
|
clearCheckbox() { |
|
|
|
if (this.form.open_setting == 1) { |
|
|
|
this.openweekly = [] |
|
|
|
if (this.form.open_setting === 1) { |
|
|
|
this.open_weekly = [] |
|
|
|
this.form.open_weekly = null |
|
|
|
} |
|
|
|
if (this.form.close_setting == 1) { |
|
|
|
if (this.form.close_setting === 1) { |
|
|
|
this.closeweekly = [] |
|
|
|
} |
|
|
|
}, |
|
|
@ -305,15 +306,19 @@ export default { |
|
|
|
this.$refs[formName].resetFields() |
|
|
|
}, |
|
|
|
submitForm(formName) { |
|
|
|
if (this.form.open_setting === 2) { |
|
|
|
this.form.open_weekly = this.open_weekly |
|
|
|
} |
|
|
|
this.$refs[formName].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
const params = this.form |
|
|
|
console.log(params) |
|
|
|
reqEditStartUp(params).then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: 'success', |
|
|
|
message: '修改设备成功' |
|
|
|
}); |
|
|
|
}) |
|
|
|
this.addFromVisible = false |
|
|
|
this.getStartUpList() |
|
|
|
} |
|
|
@ -336,7 +341,6 @@ export default { |
|
|
|
this.clearBtnDisabled = true |
|
|
|
} |
|
|
|
console.log(val) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|