Commit ba4a479d by lixiaomin

修改机器状态

parent 0a28700f
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-show="scope.row.state == 4 || scope.row.state == 5" size="mini" type="text" @click="handleBinding()">下线</el-button> <el-button v-show="scope.row.state == 4 || scope.row.state == 5" size="mini" type="text" @click="handleClick(scope.row,6)">下线</el-button>
<el-button v-show="scope.row.state == 6 || scope.row.state == 7" size="mini" type="text" @click="handleBinding()">返厂</el-button> <el-button v-show="scope.row.state == 6 || scope.row.state == 7" size="mini" type="text" @click="handleClick(scope.row,8)">返厂</el-button>
<el-button v-show="scope.row.state == 6" size="mini" type="text" @click="handleBinding()">运维</el-button> <el-button v-show="scope.row.state == 6" size="mini" type="text" @click="handleClick(scope.row,7)">运维</el-button>
<el-button v-show="scope.row.state == 6 || scope.row.state == 7" size="mini" type="text" @click="handleBinding()">上线</el-button> <el-button v-show="scope.row.state == 6 || scope.row.state == 7" size="mini" type="text" @click="handleClick(scope.row,4)">上线</el-button>
<el-button v-show="scope.row.state == 2" size="mini" type="text" @click="handleBinding()">店铺绑定</el-button> <el-button v-show="scope.row.state == 2" size="mini" type="text" @click="handleBinding()">店铺绑定</el-button>
<el-button v-show="scope.row.state == 8" size="mini" type="text" @click="handleBinding()">重置</el-button> <el-button v-show="scope.row.state == 8" size="mini" type="text" @click="handleClick(scope.row,1)">重置</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -149,14 +149,15 @@ export default { ...@@ -149,14 +149,15 @@ export default {
this.$router.push("/shop/shop/"); this.$router.push("/shop/shop/");
}, },
//更新状态 //更新状态
updateState(row){ handleClick(row,state){
let obj={ let obj={
"machine_id":row.id, "machine_id":row.id,
"state":'' "state":state
} }
updateState(obj).then((response) => { updateState(obj).then((response) => {
if(response.code==0){ if(response.code==0){
this.$modal.msgSuccess("操作成功!");
this.getList();
} }
}); });
} }
......
...@@ -24,7 +24,6 @@ export default { ...@@ -24,7 +24,6 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
console.log("this.value",this.value)
this.$nextTick(() => { this.$nextTick(() => {
updateConfig({ ...this.initValue, configValue: this.value }).then(res => { updateConfig({ ...this.initValue, configValue: this.value }).then(res => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
......
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