Commit f111d919 by 张杰

修复bug

1 parent 07bd569a
...@@ -294,19 +294,28 @@ export default { ...@@ -294,19 +294,28 @@ export default {
if (n) { if (n) {
this.getInfo(); this.getInfo();
this.getLogList(); this.getLogList();
this.scrollTo("orderInfo");
} }
}, },
immediate: true, immediate: true,
}, },
type: { type: {
handler: function (n, o) { handler: function (n, o) {
if (n == 3) { switch (n) {
case 3:
this.formRules = this.activeRules; this.formRules = this.activeRules;
this.isDisabled = true; this.isDisabled = true;
} else { break;
case 2:
this.formRules = this.editFormRules; this.formRules = this.editFormRules;
this.isDisabled = false; this.isDisabled = false;
break;
default:
this.formRules = {};
this.isDisabled = false;
break;
} }
this.scrollTo("orderInfo");
}, },
immediate: true, immediate: true,
}, },
...@@ -431,6 +440,9 @@ export default { ...@@ -431,6 +440,9 @@ export default {
// 控制页面滚动 // 控制页面滚动
scrollTo(refName) { scrollTo(refName) {
var element = this.$refs[refName]; var element = this.$refs[refName];
if(!element){
return false;
}
const top = element.offsetTop; const top = element.offsetTop;
console.log(top); console.log(top);
window.document.querySelector(".dialog_content").scrollTop = top - 60; window.document.querySelector(".dialog_content").scrollTop = top - 60;
...@@ -641,7 +653,8 @@ export default { ...@@ -641,7 +653,8 @@ export default {
// justify-content: space-between; // justify-content: space-between;
font-size: 14px; font-size: 14px;
color: #999; color: #999;
.name,.time { .name,
.time {
margin-right: 16px; margin-right: 16px;
} }
} }
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</div> </div>
</div> </div>
<template> <template>
<edit-order v-if="showWorkDialog" ref="editOrderCom" :id="orderId" :type="orderType" @change="onEditChange"></edit-order> <edit-order ref="editOrderCom" :id="orderId" :type="orderType" @change="onEditChange"></edit-order>
</template> </template>
<template slot="footer"> <template slot="footer">
<el-button type="primary" size="small" :loading="aloading" v-if="orderType == 3" @click="activeDevice()">激活</el-button> <el-button type="primary" size="small" :loading="aloading" v-if="orderType == 3" @click="activeDevice()">激活</el-button>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!