Commit b1d63bad authored by 冯超鹏's avatar 冯超鹏

改设备编辑

parent 1fafb847
Pipeline #88 failed with stages
......@@ -179,7 +179,7 @@ class DevicesController extends Controller
->leftjoin('gas', 'de.status', '=', 'gas.id')
->leftjoin('danwei as da', 'de.devicemonad', '=', 'da.id')
->leftjoin('users as ud', 'de.uid', '=', 'ud.id')
->select('dt.tid','ud.name', 'de.username','de.deviceremark','de.devicelinkman','de.devicephone','de.deviceinfo','de.devicecoord','de.uid','de.devicenum')
->select('dt.tid','ud.name', 'de.username','de.deviceremark','de.devicelinkman','de.devicephone','de.deviceinfo','de.devicecoord','de.uid','de.devicenum','de.devicemonad','de.status')
->first();
return $this->jsonSuccessData($devi);
}
......
......@@ -198,6 +198,14 @@
<el-option v-for="item in list" :key="item.id" :label="item.tname" :value="item.tid"></el-option>
</el-select>
</el-form-item>
<el-form-item label="选择类别">
<el-select v-model="updevicedata.devicemonad" placeholder="请选择单位">
<el-option v-for="item in danwei" :key="item.id" :label="item.danwei" :value="item.id"></el-option>
</el-select>
<el-select v-model="updevicedata.status" placeholder="请选择介质">
<el-option v-for="item in gas" :key="item.id" :label="item.gas" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="updedata">立即更新</el-button>
<el-button @click="handleCloseup">取消</el-button>
......@@ -227,6 +235,8 @@ export default {
dialogPvVisible: false,
activeName: 'second',
list: [],
danwei: [],
gas: [],
loading: true,
device: [],
deviceDataInfo: [],
......@@ -270,6 +280,8 @@ export default {
.then(response => {
var devicetype = response.data;
this.list = devicetype['devicetype'];
this.danwei = devicetype['danwei'];
this.gas = devicetype['gas'];
})
.catch(err => {
console.log(err);
......@@ -510,4 +522,12 @@ export default {
margin-bottom: 0;
width: 50%;
}
.el-drawer__header {
align-items: center;
color: #72767b;
display: flex;
margin-bottom: -4px;
padding: 20px;
padding-bottom: 0;
}
</style>
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