This commit is contained in:
2022-10-31 14:40:34 +08:00
6 changed files with 48 additions and 21 deletions

View File

@@ -268,7 +268,11 @@ function CRUD(options) {
/** /**
* 取消新增/编辑 * 取消新增/编辑
*/ */
cancelCU() { cancelCU(formName) {
if (formName instanceof PointerEvent) {
formName = 'form'
}
const addStatus = crud.status.add const addStatus = crud.status.add
const editStatus = crud.status.edit const editStatus = crud.status.edit
const viewStatus = crud.status.view const viewStatus = crud.status.view
@@ -296,18 +300,21 @@ function CRUD(options) {
callVmHook(crud, CRUD.HOOK.afterEditCancel, crud.form) callVmHook(crud, CRUD.HOOK.afterEditCancel, crud.form)
} }
// 清除表单验证 // 清除表单验证
if (crud.findVM('form').$refs['form']) { if (crud.findVM('form').$refs[formName]) {
crud.findVM('form').$refs['form'].clearValidate() crud.findVM('form').$refs[formName].clearValidate()
} }
}, },
/** /**
* 提交新增/编辑 * 提交新增/编辑
*/ */
submitCU(form) { submitCU(formName) {
if (formName instanceof PointerEvent) {
formName = 'form'
}
if (!callVmHook(crud, CRUD.HOOK.beforeValidateCU)) { if (!callVmHook(crud, CRUD.HOOK.beforeValidateCU)) {
return return
} }
crud.findVM('form').$refs['form'].validate(valid => { crud.findVM('form').$refs[formName].validate(valid => {
if (!valid) { if (!valid) {
return return
} }
@@ -493,8 +500,10 @@ function CRUD(options) {
} }
} }
// add by ghl 2020-10-04 页面重复添加信息时,下拉框的校验会存在,需要找工取消 // add by ghl 2020-10-04 页面重复添加信息时,下拉框的校验会存在,需要找工取消
if (crud.findVM('form').$refs['form']) { let form_ref = 'form'
crud.findVM('form').$refs['form'].clearValidate() if (crudFrom.form_ref) form_ref = crudFrom.form_ref
if (crud.findVM('form').$refs[form_ref]) {
crud.findVM('form').$refs[form_ref].clearValidate()
} }
}, },
/** /**

View File

@@ -79,7 +79,7 @@ public class PointServiceImpl implements PointService {
String[] types = split[j].split("-"); String[] types = split[j].split("-");
typeArr.put(types[0], types[1]); typeArr.put(types[0], types[1]);
} }
object.put("point_status_name", typeArr.getString(point_type)); object.put("point_type_name", typeArr.getString(point_type));
} }
res.add(object); res.add(object);
} }

View File

@@ -64,7 +64,6 @@
"screenfull": "4.2.0", "screenfull": "4.2.0",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",
"throttle-debounce": "^5.0.0", "throttle-debounce": "^5.0.0",
"v-fit-columns": "^0.2.0",
"vue": "2.6.10", "vue": "2.6.10",
"vue-color": "^2.8.1", "vue-color": "^2.8.1",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",

View File

@@ -167,6 +167,7 @@ input[type="number"]::-webkit-outer-spin-button {
} }
//去除编辑文本框为数字时的上下箭头end //去除编辑文本框为数字时的上下箭头end
//设置计数器文字居左 //设置计数器文字居左
.el-input-number--mini .el-input__inner { .el-input-number--mini .el-input__inner {
text-align: left; text-align: left;
@@ -192,10 +193,12 @@ input[type="number"]::-webkit-outer-spin-button {
height: 35px; height: 35px;
font-size: 13px; font-size: 13px;
} }
td{
color: #f8f8f9; td {
color: #f8f8f9;
} }
} }
.el-table__body-wrapper { .el-table__body-wrapper {
.el-button [class*="el-icon-"] + span { .el-button [class*="el-icon-"] + span {
margin-left: 1px; margin-left: 1px;
@@ -203,3 +206,13 @@ input[type="number"]::-webkit-outer-spin-button {
} }
} }
//表格固定列最后一行显示不全(https://mp.weixin.qq.com/s/HpoykJNtsynsW4UMHitZbQ)
.el-table__fixed-right {
height: 100% !important;
}
//表头与内容错位
.el-table--scrollable-y .el-table__body-wrapper {
overflow-y: overlay !important;
}

View File

@@ -268,7 +268,11 @@ function CRUD(options) {
/** /**
* 取消新增/编辑 * 取消新增/编辑
*/ */
cancelCU() { cancelCU(formName) {
if (formName instanceof PointerEvent) {
formName = 'form'
}
const addStatus = crud.status.add const addStatus = crud.status.add
const editStatus = crud.status.edit const editStatus = crud.status.edit
const viewStatus = crud.status.view const viewStatus = crud.status.view
@@ -296,18 +300,21 @@ function CRUD(options) {
callVmHook(crud, CRUD.HOOK.afterEditCancel, crud.form) callVmHook(crud, CRUD.HOOK.afterEditCancel, crud.form)
} }
// 清除表单验证 // 清除表单验证
if (crud.findVM('form').$refs['form']) { if (crud.findVM('form').$refs[formName]) {
crud.findVM('form').$refs['form'].clearValidate() crud.findVM('form').$refs[formName].clearValidate()
} }
}, },
/** /**
* 提交新增/编辑 * 提交新增/编辑
*/ */
submitCU(form) { submitCU(formName) {
if (formName instanceof PointerEvent) {
formName = 'form'
}
if (!callVmHook(crud, CRUD.HOOK.beforeValidateCU)) { if (!callVmHook(crud, CRUD.HOOK.beforeValidateCU)) {
return return
} }
crud.findVM('form').$refs['form'].validate(valid => { crud.findVM('form').$refs[formName].validate(valid => {
if (!valid) { if (!valid) {
return return
} }
@@ -493,8 +500,10 @@ function CRUD(options) {
} }
} }
// add by ghl 2020-10-04 页面重复添加信息时,下拉框的校验会存在,需要找工取消 // add by ghl 2020-10-04 页面重复添加信息时,下拉框的校验会存在,需要找工取消
if (crud.findVM('form').$refs['form']) { let form_ref = 'form'
crud.findVM('form').$refs['form'].clearValidate() if (crudFrom.form_ref) form_ref = crudFrom.form_ref
if (crud.findVM('form').$refs[form_ref]) {
crud.findVM('form').$refs[form_ref].clearValidate()
} }
}, },
/** /**

View File

@@ -61,9 +61,6 @@ Vue.prototype.handleTree = handleTree
Vue.prototype.getValueByCode = getValueByCode Vue.prototype.getValueByCode = getValueByCode
Vue.prototype.flexWidth = flexWidth Vue.prototype.flexWidth = flexWidth
import Plugin from 'v-fit-columns'
Vue.use(Plugin)
Vue.use(scroll) Vue.use(scroll)
Vue.use(VueHighlightJS) Vue.use(VueHighlightJS)