|
@@ -49,6 +49,14 @@
|
|
|
>信息牌配置</p>
|
|
|
</el-form>
|
|
|
<el-table class="table-box" border v-loading="loading" :data="tableData">
|
|
|
+ <el-table-column label="排序" align="left" prop="orderNum" width="75">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input maxlength="4" type="text" oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
+ v-model="scope.row.orderNum" @focus="liveSort(scope.row)"
|
|
|
+ @blur="editSort(scope.row)">
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="类目名称" align="left" prop="brandName"/>
|
|
|
<el-table-column label="内容类型" align="left" prop="brandType">
|
|
|
<template slot-scope="scope">
|
|
@@ -104,6 +112,11 @@
|
|
|
<el-form-item label="类目名称" prop="brandName">
|
|
|
<el-input v-model="form.brandName" maxlength="30" placeholder="请输入类目名称" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="排序" prop="orderNum">
|
|
|
+ <el-input maxlength="4" type="text" oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
+ v-model="form.orderNum" placeholder="请输入排序">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="内容类型" prop="brandType">
|
|
|
<el-radio-group v-model="form.brandType">
|
|
|
<el-radio :label="1">文字</el-radio>
|
|
@@ -174,6 +187,9 @@ export default {
|
|
|
brandName: [
|
|
|
{ required: true, message: "请输入类目名称", trigger: "blur" },
|
|
|
],
|
|
|
+ orderNum: [
|
|
|
+ { required: true, message: "请输入排序", trigger: "blur" },
|
|
|
+ ],
|
|
|
brandType: [
|
|
|
{ required: true, message: "请选择内容类型", trigger: "blur" },
|
|
|
],
|
|
@@ -183,12 +199,49 @@ export default {
|
|
|
showColour: [
|
|
|
{ required: true, message: "请选择颜色", trigger: "blur" }
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 临时保存排序
|
|
|
+ orderNum: '',
|
|
|
};
|
|
|
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ //保存当前排序
|
|
|
+ liveSort(row) {
|
|
|
+ let obj = {
|
|
|
+ orderNum: row.orderNum
|
|
|
+ }
|
|
|
+ this.orderNum = JSON.parse(JSON.stringify(obj))
|
|
|
+ },
|
|
|
+ //编辑排序
|
|
|
+ editSort(row) {
|
|
|
+ let self = this
|
|
|
+ if (row.orderNum != this.orderNum.orderNum) {
|
|
|
+ self.$confirm('是否确认修改排序?', '', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ let obj = {
|
|
|
+ brandId:row.brandId,
|
|
|
+ brandName:row.brandName,
|
|
|
+ brandType:row.brandType,
|
|
|
+ isSpecial:row.isSpecial,
|
|
|
+ showColour:row.showColour,
|
|
|
+ orderNum: row.orderNum
|
|
|
+ }
|
|
|
+ laboratoryInfoBrandUpdate(obj).then(response => {
|
|
|
+ self.msgSuccess('修改成功')
|
|
|
+ self.getList()
|
|
|
+ })
|
|
|
+ }).then(() => {
|
|
|
+ }).catch(() => {
|
|
|
+ let obj = JSON.parse(JSON.stringify(self.orderNum))
|
|
|
+ row.orderNum = obj.orderNum
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
titleClick(type){
|
|
|
this.$parent.titleClick(type);
|
|
|
},
|
|
@@ -215,6 +268,7 @@ export default {
|
|
|
brandType:row.brandType,
|
|
|
isSpecial:row.isSpecial,
|
|
|
showColour:row.showColour,
|
|
|
+ orderNum:row.orderNum,
|
|
|
});
|
|
|
this.open = true;
|
|
|
}else if(doType=='deploy'){//信息牌配置
|
|
@@ -350,6 +404,15 @@ export default {
|
|
|
width:200px;
|
|
|
display: flex;
|
|
|
}
|
|
|
+ .table-box{
|
|
|
+ ::v-deep .el-input--medium .el-input__inner {
|
|
|
+ height: 26px;
|
|
|
+ line-height: 26px;
|
|
|
+ width: 55px;
|
|
|
+ text-align: center;
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|