Commit fcd137e2 authored by 赵啸非's avatar 赵啸非

添加分辨率字典获取

parent 668ed6e7
...@@ -10,7 +10,7 @@ NProgress.configure({ showSpinner: false }); ...@@ -10,7 +10,7 @@ NProgress.configure({ showSpinner: false });
Vue.use(Router); Vue.use(Router);
const originalPush = Router.prototype.push; const originalPush = Router.prototype.push;
VueRouter.prototype.push = function push(location, onResolve, onReject) { Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) if (onResolve || onReject)
return originalPush.call(this, location, onResolve, onReject); return originalPush.call(this, location, onResolve, onReject);
return originalPush.call(this, location).catch((err) => err); return originalPush.call(this, location).catch((err) => err);
......
...@@ -275,6 +275,10 @@ export default { ...@@ -275,6 +275,10 @@ export default {
}, },
methods: { methods: {
beforeSubmit(form) {
form.resolutionValue=this.dict.resolution[form.resolution]
return form;
},
changeProduct(val) { changeProduct(val) {
this.form.productCode = this.dict.productCode[val]; this.form.productCode = this.dict.productCode[val];
}, },
......
...@@ -81,3 +81,4 @@ ALTER TABLE mortals_xhx_idgenerator ADD COLUMN `createTime` datetime(0) NULL DE ...@@ -81,3 +81,4 @@ ALTER TABLE mortals_xhx_idgenerator ADD COLUMN `createTime` datetime(0) NULL DE
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_xhx_device ADD COLUMN `resolution` varchar(64) DEFAULT '' COMMENT '设备分辨率' AFTER deviceInFloor; ALTER TABLE mortals_xhx_device ADD COLUMN `resolution` varchar(64) DEFAULT '' COMMENT '设备分辨率' AFTER deviceInFloor;
ALTER TABLE mortals_xhx_device ADD COLUMN `resolutionValue` varchar(64) DEFAULT '' COMMENT '设备分辨率' AFTER resolution;
...@@ -221,6 +221,10 @@ public class DeviceEntity extends DeviceVo { ...@@ -221,6 +221,10 @@ public class DeviceEntity extends DeviceVo {
* 设备分辨率 * 设备分辨率
*/ */
private String resolution; private String resolution;
/**
* 设备分辨率值
*/
private String resolutionValue;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -286,5 +290,6 @@ public class DeviceEntity extends DeviceVo { ...@@ -286,5 +290,6 @@ public class DeviceEntity extends DeviceVo {
this.showWechatQrCode = 1; this.showWechatQrCode = 1;
this.orgName = ""; this.orgName = "";
this.resolution = ""; this.resolution = "";
this.resolutionValue = "";
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.device.model; package com.mortals.xhx.module.device.model;
import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.device.model.DeviceEntity;
/** /**
* 设备查询对象 * 设备查询对象
* *
...@@ -490,6 +488,11 @@ public class DeviceQuery extends DeviceEntity { ...@@ -490,6 +488,11 @@ public class DeviceQuery extends DeviceEntity {
/** 设备分辨率排除列表 */ /** 设备分辨率排除列表 */
private List <String> resolutionNotList; private List <String> resolutionNotList;
/** 设备分辨率值 */
private List<String> resolutionValueList;
/** 设备分辨率值排除列表 */
private List <String> resolutionValueNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DeviceQuery> orConditionList; private List<DeviceQuery> orConditionList;
...@@ -3223,6 +3226,38 @@ public class DeviceQuery extends DeviceEntity { ...@@ -3223,6 +3226,38 @@ public class DeviceQuery extends DeviceEntity {
this.resolutionNotList = resolutionNotList; this.resolutionNotList = resolutionNotList;
} }
/**
* 获取 设备分辨率值
* @return resolutionValueList
*/
public List<String> getResolutionValueList(){
return this.resolutionValueList;
}
/**
* 设置 设备分辨率值
* @param resolutionValueList
*/
public void setResolutionValueList(List<String> resolutionValueList){
this.resolutionValueList = resolutionValueList;
}
/**
* 获取 设备分辨率值
* @return resolutionValueNotList
*/
public List<String> getResolutionValueNotList(){
return this.resolutionValueNotList;
}
/**
* 设置 设备分辨率值
* @param resolutionValueNotList
*/
public void setResolutionValueNotList(List<String> resolutionValueNotList){
this.resolutionValueNotList = resolutionValueNotList;
}
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param id * @param id
...@@ -4875,6 +4910,25 @@ public class DeviceQuery extends DeviceEntity { ...@@ -4875,6 +4910,25 @@ public class DeviceQuery extends DeviceEntity {
return this; return this;
} }
/**
* 设置 设备分辨率值
* @param resolutionValue
*/
public DeviceQuery resolutionValue(String resolutionValue){
setResolutionValue(resolutionValue);
return this;
}
/**
* 设置 设备分辨率值
* @param resolutionValueList
*/
public DeviceQuery resolutionValueList(List<String> resolutionValueList){
this.resolutionValueList = resolutionValueList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -113,6 +113,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -113,6 +113,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
Rest<Map<String, String>> restDict = skinBaseFeign.dict("SkinBase", "imageResolution"); Rest<Map<String, String>> restDict = skinBaseFeign.dict("SkinBase", "imageResolution");
if (restDict.getCode() == YesNoEnum.YES.getValue()) { if (restDict.getCode() == YesNoEnum.YES.getValue()) {
Map<String, String> dict = restDict.getData(); Map<String, String> dict = restDict.getData();
this.addDict(model, "resolution", dict); this.addDict(model, "resolution", dict);
} }
//siteHallFeign.list(new SiteHallPdu().setSiteId(context.g);) //siteHallFeign.list(new SiteHallPdu().setSiteId(context.g);)
......
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