|
@@ -49,9 +49,12 @@
|
|
|
.el-input-number,.el-input,.el-textarea{
|
|
.el-input-number,.el-input,.el-textarea{
|
|
|
width: 300px;
|
|
width: 300px;
|
|
|
}
|
|
}
|
|
|
- button{
|
|
|
|
|
|
|
+ .submit{
|
|
|
width: 390px;
|
|
width: 390px;
|
|
|
}
|
|
}
|
|
|
|
|
+ button{
|
|
|
|
|
+ margin-top:10px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -128,16 +131,33 @@
|
|
|
<el-input v-model="form.change_class_hour"></el-input>
|
|
<el-input v-model="form.change_class_hour"></el-input>
|
|
|
<span class="req">*</span>
|
|
<span class="req">*</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="设备种类">
|
|
|
|
|
+ <el-button type="info" plain :key=i v-for="(item,i) in form.device_cats">{{item}}
|
|
|
|
|
+ <i class="el-icon-upload el-icon-close" @click="delDeviceCat(i)"></i>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button @click="dialogFormVisible1=true;newDeiceCat=null">新增<i class="el-icon-upload el-icon-plus"></i></el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="排序">
|
|
<el-form-item label="排序">
|
|
|
<el-input-number v-model="form.order" controls-position="right" :min="0" ></el-input-number>
|
|
<el-input-number v-model="form.order" controls-position="right" :min="0" ></el-input-number>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="说明">
|
|
<el-form-item label="说明">
|
|
|
<el-input :rows="4" type="textarea" v-model="form.intro"></el-input>
|
|
<el-input :rows="4" type="textarea" v-model="form.intro"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-button @click="save" type="primary">保存</el-button>
|
|
|
|
|
|
|
+ <el-button class="submit" @click="save" type="primary">保存</el-button>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <el-dialog title="新增设备种类" :visible.sync="dialogFormVisible1" width="500px" :close-on-click-modal='false' :close-on-press-escape='false'>
|
|
|
|
|
+ <el-form size="small" label-width="80px">
|
|
|
|
|
+ <el-form-item label="设备名称">
|
|
|
|
|
+ <el-input clearable v-model="newDeiceCat"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button size="small" @click="dialogFormVisible1 = false">取 消</el-button>
|
|
|
|
|
+ <el-button size="small" type="primary" @click="addDeviceCat">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
</section>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -151,7 +171,9 @@ export default {
|
|
|
label:'name'
|
|
label:'name'
|
|
|
},
|
|
},
|
|
|
add:0,
|
|
add:0,
|
|
|
- loading:false
|
|
|
|
|
|
|
+ loading:false,
|
|
|
|
|
+ dialogFormVisible1:false,
|
|
|
|
|
+ newDeiceCat:null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
@@ -175,7 +197,8 @@ export default {
|
|
|
order:0,
|
|
order:0,
|
|
|
class_hour:data.class_hour,
|
|
class_hour:data.class_hour,
|
|
|
update_class_hour:data.update_class_hour,
|
|
update_class_hour:data.update_class_hour,
|
|
|
- change_class_hour:data.change_class_hour
|
|
|
|
|
|
|
+ change_class_hour:data.change_class_hour,
|
|
|
|
|
+ device_cats:data.device_cats
|
|
|
}
|
|
}
|
|
|
if(!data.children || data.children.length<=0){
|
|
if(!data.children || data.children.length<=0){
|
|
|
parm.isleaf=1
|
|
parm.isleaf=1
|
|
@@ -214,6 +237,13 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ delDeviceCat(i){
|
|
|
|
|
+ this.form.device_cats.splice(i,1)
|
|
|
|
|
+ },
|
|
|
|
|
+ addDeviceCat(){
|
|
|
|
|
+ this.form.device_cats.push(this.newDeiceCat);
|
|
|
|
|
+ this.dialogFormVisible1 = false
|
|
|
|
|
+ },
|
|
|
save(){
|
|
save(){
|
|
|
var parm=this.form;
|
|
var parm=this.form;
|
|
|
if(parm.id){
|
|
if(parm.id){
|