Commit 1ad0ec41 by 吴娟华

'1.2.1'

1 parent 683f94af
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
</div> </div>
</h3> </h3>
<basic-table ref="vehicleForm" :tableParams="vehicleTableParams" :getListApi="getListApi" :searchForm="searchForm" @dataFinished="tableDataFinished" :hasNum="false"> <basic-table ref="vehicleForm" :beforeSearchFn="beforeSearchFn" :tableParams="vehicleTableParams" :getListApi="getListApi" :searchForm="searchForm" @dataFinished="tableDataFinished" :hasNum="false">
<span slot="table-button" slot-scope="scope"> <span slot="table-button" slot-scope="scope">
<el-button v-for="(j, idx) in vehicleTableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" size="mini" plain @click="btnClick(j.pType, scope.scope)">{{j.name}}</el-button> <el-button v-for="(j, idx) in vehicleTableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" size="mini" plain @click="btnClick(j.pType, scope.scope)">{{j.name}}</el-button>
<el-button v-if="scope.scope.sns" type="text" size="mini" @click="btnClick('unbind', scope.scope)">解绑</el-button> <el-button v-if="scope.scope.sns" type="text" size="mini" @click="btnClick('unbind', scope.scope)">解绑</el-button>
...@@ -174,8 +174,8 @@ export default { ...@@ -174,8 +174,8 @@ export default {
cb(new Error("请输入设备号")); cb(new Error("请输入设备号"));
} }
if(sn) { if(sn) {
this._timeoutId && clearTimeout(this._timeoutId) //this._timeoutId && clearTimeout(this._timeoutId)
this._timeoutId = setTimeout(()=>{ //this._timeoutId = setTimeout(()=>{
verifydevice({sn}).then((res)=>{ verifydevice({sn}).then((res)=>{
if(res.code == 200) { if(res.code == 200) {
checkSn({sn}).then((res)=>{ checkSn({sn}).then((res)=>{
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
cb(new Error(res.message)) cb(new Error(res.message))
} }
}) })
}, 500) //}, 500)
} else { } else {
cb() cb()
} }
...@@ -715,6 +715,17 @@ export default { ...@@ -715,6 +715,17 @@ export default {
}, },
methods: { methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm.date)
if(this.searchForm.date) {
this.searchForm.activateTimeStart = this.searchForm.date[0]
this.searchForm.activateTimeEnd = this.searchForm.date[1]
}
resolve()
})
},
tableDataFinished() { tableDataFinished() {
this.$nextTick(() => { this.$nextTick(() => {
this.$root.parentCommon.setAuthBtn(); this.$root.parentCommon.setAuthBtn();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!