Commit ea6f7dc3 authored by coffee's avatar coffee

需求变更

parent 5cbb8703
...@@ -18,12 +18,18 @@ export default { ...@@ -18,12 +18,18 @@ export default {
return { return {
newtotalSize: this.totalSize, newtotalSize: this.totalSize,
newpageSize: this.pageSize, newpageSize: this.pageSize,
currentPage: 1 // 当前页 currentPage: this.pageIndex // 当前页
} }
}, },
watch: { watch: {
totalSize(n, o) { totalSize(n, o) {
this.newtotalSize = n this.newtotalSize = n
},
pageIndex(n, o) {
this.currentPage = n;
},
pageSize(n, o ){
this.newpageSize = n;
} }
}, },
props: { props: {
...@@ -36,6 +42,11 @@ export default { ...@@ -36,6 +42,11 @@ export default {
totalSize: { totalSize: {
type: Number, type: Number,
default: 0 default: 0
},
// 父组件页码
pageIndex: {
type: Number,
default: 1
} }
}, },
methods: { methods: {
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
title="热泵主机设置" title="热泵主机设置"
:visible.sync="visible" :visible.sync="visible"
:append-to-body="true" :append-to-body="true"
width="20%" width="380px"
> >
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :inline="true" label-width="150px" label-position=""> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" :inline="true" label-width="150px" label-position="">
<el-row> <!-- <el-row>
<el-form-item label="风水模式:"> <el-form-item label="风水模式:">
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -45,6 +45,11 @@ ...@@ -45,6 +45,11 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
</el-row> -->
<el-row>
<el-form-item label="模式:" :label-width="formLabelWidth">
<el-switch v-model="modelType" @change="changeHandle($event)" active-text="风水模式" inactive-text="热水模式" inactive-color="#ff4949" style="margin-bottom: 5px;"></el-switch>
</el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="制热启动温度:" :label-width="formLabelWidth" prop="heating_start_temperature"> <el-form-item label="制热启动温度:" :label-width="formLabelWidth" prop="heating_start_temperature">
...@@ -114,6 +119,7 @@ export default { ...@@ -114,6 +119,7 @@ export default {
name: 'hallModal', name: 'hallModal',
data() { data() {
return { return {
modelType: null,
formLabelWidth: '120px', formLabelWidth: '120px',
visible: false, visible: false,
frequency: '', frequency: '',
...@@ -131,8 +137,25 @@ export default { ...@@ -131,8 +137,25 @@ export default {
init(data) { init(data) {
console.log('data', data) console.log('data', data)
this.dataForm = JSON.parse(JSON.stringify(data)) this.dataForm = JSON.parse(JSON.stringify(data))
if(this.dataForm.feng_shui_mode == 'true'){
this.modelType = true
}else{
this.modelType = false
}
this.visible = true this.visible = true
}, },
// 模式切换
changeHandle(status){
if(status){
// 风水模式
this.setRsStatus(0)
this.setFsStatus(1)
}else{
// 热水模式
this.setFsStatus(0)
this.setRsStatus(1)
}
},
setFsStatus(status){ setFsStatus(status){
this.$http({ this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'), url: this.$http.adornUrl('/equipment/onOrOff'),
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
type="primary" type="primary"
size="mini" size="mini"
@click="timingControl" @click="timingControl"
>定时温控</el-button >定时启停</el-button
> >
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
</div> </div>
<el-dialog <el-dialog
title="定时温控" title="定时启停"
:visible.sync="timingControlDialogVisible" :visible.sync="timingControlDialogVisible"
append-to-body append-to-body
width="40%" width="550px"
> >
<el-form <el-form
:inline="true" :inline="true"
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
> >
<el-row> <!-- <el-row>
<el-form-item label="温度设定(℃):" prop="temperature"> <el-form-item label="温度设定(℃):" prop="temperature">
<el-input <el-input
size="mini" size="mini"
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
>确定</el-button >确定</el-button
> >
</el-form-item> </el-form-item>
</el-row> </el-row> -->
<el-row> <el-row>
<el-form-item label="定时功能起止时间:"> <el-form-item label="定时功能起止时间:">
<el-time-select <el-time-select
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
<table-list <table-list
:tableColums="tableColums" :tableColums="tableColums"
:tableData="tableData" :tableData="tableData"
:showOpr="true" :showOpr="$store.state.d2admin.paramsList.list.syBean.type == 1 ? true : false"
:opNum="3" :opNum="3"
:showStateColor="true" :showStateColor="true"
:currentMode="currentModel" :currentMode="currentModel"
...@@ -690,6 +690,7 @@ export default { ...@@ -690,6 +690,7 @@ export default {
}, },
// 人工节能 // 人工节能
handleSwitch(state) { handleSwitch(state) {
this.$store.state.d2admin.paramsList.list.syBean.type = state
this.isSaving = state this.isSaving = state
this.$http({ this.$http({
url: this.$http.adornUrl('/equipment/changeType'), url: this.$http.adornUrl('/equipment/changeType'),
...@@ -707,6 +708,10 @@ export default { ...@@ -707,6 +708,10 @@ export default {
this.getAllHcdt() this.getAllHcdt()
} }
}) })
this.$nextTick(()=>{
this.$forceUpdate()
console.log(this.isSaving);
})
}, },
// 设置定时任务 // 设置定时任务
setSendTime(type) { setSendTime(type) {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<table-list <table-list
:tableColums="tableColums" :tableColums="tableColums"
:tableData="tableData" :tableData="tableData"
:showOpr="true" :showOpr="$store.state.d2admin.paramsList.list.syBean.type == 1 ? true : false"
:opNum="3" :opNum="3"
:showStateColor="true" :showStateColor="true"
:currentMode="currentModel" :currentMode="currentModel"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
p.leftP 设备型号:&nbsp;&nbsp;&nbsp;{{ dataForm.equipmentModel }} p.leftP 设备型号:&nbsp;&nbsp;&nbsp;{{ dataForm.equipmentModel }}
.quDetailM .quDetailM
p.leftP 安装日期:&nbsp;&nbsp;&nbsp;{{ dataForm.installDate }} p.leftP 安装日期:&nbsp;&nbsp;&nbsp;{{ dataForm.installDate }}
.info-form(:style="{'border-bottom':(dataForm.type=='b6af764f2a6e454490a6b1b3c9057e57'||dataForm.type=='173466a2cf9a42a6a17b2bdfbeae36d5') ? '1px solid #c0c0c0': ''}" ) .info-form(v-if='$store.state.d2admin.paramsList.list.syBean.type == 1' :style="{'border-bottom':(['b45827c068254695864ee3c1d42573cb','b6af764f2a6e454490a6b1b3c9057e57','173466a2cf9a42a6a17b2bdfbeae36d5'].includes(dataForm.type))&&$store.state.d2admin.paramsList.list.syBean.type == 1 ? '1px solid #c0c0c0': ''}" )
//- | {{dataForm.status}} //- | {{dataForm.status}}
//- el-row.text-size(v-if="openOrClose.indexOf(dataForm.type)>-1") //- el-row.text-size(v-if="openOrClose.indexOf(dataForm.type)>-1")
el-row.text-size(v-if="dataForm.type=='b6af764f2a6e454490a6b1b3c9057e57'||dataForm.type=='173466a2cf9a42a6a17b2bdfbeae36d5'") el-row.text-size(v-if="dataForm.type=='b6af764f2a6e454490a6b1b3c9057e57'||dataForm.type=='173466a2cf9a42a6a17b2bdfbeae36d5'")
...@@ -62,6 +62,25 @@ ...@@ -62,6 +62,25 @@
el-option(label="中风" value="4") el-option(label="中风" value="4")
el-option(label="低风" value="8") el-option(label="低风" value="8")
el-button(type="primary", size="mini", style="margin-left: 3px" @click="handleSwitch2(3)") 设定 el-button(type="primary", size="mini", style="margin-left: 3px" @click="handleSwitch2(3)") 设定
//- 风热冷泵机组
el-row.text-size(v-if="dataForm.type=='b45827c068254695864ee3c1d42573cb'")
el-col(:span="16" )
el-row
el-col
span 模式:
el-switch(v-model="modelType" @change="changeHandle($event)" active-text="风水模式" inactive-text="热水模式" inactive-color="#ff4949" style="margin-bottom: 5px;")
el-row
el-col
span 制热启停温度(℃):
el-input(v-model="params[0].heating_start_temperature" size="mini" style="width: 50px")
span(style="margin:0 10px") -
el-input(v-model="params[0].heating_stop_temperature" size="mini" style="width: 50px")
el-row
el-col
span 热风启停温度(℃):
el-input(v-model="hotWindStart" size="mini" style="width: 50px")
span(style="margin:0 10px") -
el-input(v-model="hotWindEnd" size="mini" style="width: 50px")
//- el-row.text-size(style="margin-top: 10px" v-if="dataForm.type=='303310efddb34a2e9bf269bdff8a7dc5'||dataForm.type=='f4c840711eae4bcb9536a890cdfda493'") //- el-row.text-size(style="margin-top: 10px" v-if="dataForm.type=='303310efddb34a2e9bf269bdff8a7dc5'||dataForm.type=='f4c840711eae4bcb9536a890cdfda493'")
//- el-col(:span="16" ) //- el-col(:span="16" )
//- span 频率设置: //- span 频率设置:
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
el-button(type="text" v-if="isAuth('sys:points:update')" @click="addOrUpdateHandle(data.scope)") 编辑 el-button(type="text" v-if="isAuth('sys:points:update')" @click="addOrUpdateHandle(data.scope)") 编辑
el-button(type="text" v-if="isAuth('sys:points:delete')" @click="deleteHandle(data.scope.id)") 删除 el-button(type="text" v-if="isAuth('sys:points:delete')" @click="deleteHandle(data.scope.id)") 删除
el-footer.box_footer el-footer.box_footer
tablePagination( :pageSize="pageSize" :totalSize="totalPage" @parentMethod="getDataList" ) tablePagination( :pageSize="pageSize" :totalSize="totalPage" :pageIndex='pageIndex' @parentMethod="getDataList" )
el-dialog(width="40%",:append-to-body='true' :visible.sync='visible' :modal-append-to-body='false' @close="closeForm('ruleForm')") el-dialog(width="40%",:append-to-body='true' :visible.sync='visible' :modal-append-to-body='false' @close="closeForm('ruleForm')")
div.title-bold(slot='title') {{!ruleForm.id ? '新增点位': '编辑点位'}} div.title-bold(slot='title') {{!ruleForm.id ? '新增点位': '编辑点位'}}
el-form(:model="ruleForm", :inline="false" :rules="rules" ref="ruleForm", label-width="100px", @submit.native.prevent) el-form(:model="ruleForm", :inline="false" :rules="rules" ref="ruleForm", label-width="100px", @submit.native.prevent)
...@@ -287,6 +287,8 @@ export default { ...@@ -287,6 +287,8 @@ export default {
} }
}, },
getDataList(page, size) { getDataList(page, size) {
if (page) this.pageSize = size;
this.pageIndex = page || 1;
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/liResourcePoints/pageList'), url: this.$http.adornUrl('/liResourcePoints/pageList'),
...@@ -339,7 +341,13 @@ export default { ...@@ -339,7 +341,13 @@ export default {
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.getDataList() if(this.ruleForm.id){
// 编辑 不跳转第一页
this.getDataList(this.pageIndex,this.pageSize)
}else{
// 新增 跳转第一页
this.getDataList()
}
} }
}) })
} else { } else {
......
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