解决大小写的问题

This commit is contained in:
wuxw 2024-01-15 15:16:42 +08:00
parent 0d3fcc5d22
commit 5448c1f0df
2 changed files with 10 additions and 9 deletions

View File

@ -23,7 +23,7 @@
methods: { methods: {
addDataPrivilegeValidate() { addDataPrivilegeValidate() {
return vc.validate.validate({ return vc.validate.validate({
addDataPrivilegeInfo: vc.component.addDataPrivilegeInfo addDataPrivilegeInfo: $that.addDataPrivilegeInfo
}, { }, {
'addDataPrivilegeInfo.name': [ 'addDataPrivilegeInfo.name': [
{ {
@ -76,20 +76,20 @@
}); });
}, },
saveDataPrivilegeInfo: function () { saveDataPrivilegeInfo: function () {
if (!vc.component.addDataPrivilegeValidate()) { if (!$that.addDataPrivilegeValidate()) {
vc.toast(vc.validate.errInfo); vc.toast(vc.validate.errInfo);
return; return;
} }
vc.component.addDataPrivilegeInfo.communityId = vc.getCurrentCommunity().communityId; $that.addDataPrivilegeInfo.communityId = vc.getCurrentCommunity().communityId;
//不提交数据将数据 回调给侦听处理 //不提交数据将数据 回调给侦听处理
if (vc.notNull($props.callBackListener)) { if (vc.notNull($props.callBackListener)) {
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addDataPrivilegeInfo); vc.emit($props.callBackListener, $props.callBackFunction, $that.addDataPrivilegeInfo);
$('#addDataPrivilegeModel').modal('hide'); $('#addDataPrivilegeModel').modal('hide');
return; return;
} }
vc.http.apiPost( vc.http.apiPost(
'/dataPrivilege.saveDataPrivilege', '/dataPrivilege.saveDataPrivilege',
JSON.stringify(vc.component.addDataPrivilegeInfo), { JSON.stringify($that.addDataPrivilegeInfo), {
emulateJSON: true emulateJSON: true
}, },
function (json, res) { function (json, res) {
@ -98,7 +98,7 @@
if (_json.code == 0) { if (_json.code == 0) {
//关闭model //关闭model
$('#addDataPrivilegeModel').modal('hide'); $('#addDataPrivilegeModel').modal('hide');
vc.component.clearAddDataPrivilegeInfo(); $that.clearAddDataPrivilegeInfo();
vc.emit('dataPrivilegeDiv', '_loadDataPrivilege', {}); vc.emit('dataPrivilegeDiv', '_loadDataPrivilege', {});
vc.toast("添加成功"); vc.toast("添加成功");
return; return;
@ -112,10 +112,11 @@
}); });
}, },
clearAddDataPrivilegeInfo: function () { clearAddDataPrivilegeInfo: function () {
vc.component.addDataPrivilegeInfo = { let _communityId = $that.addDataPrivilegeInfo.communityId;
$that.addDataPrivilegeInfo = {
name: '', name: '',
code: '', code: '',
communityId: '', communityId: _communityId,
remark: '' remark: ''
}; };
} }

View File

@ -39,7 +39,7 @@
<hr class="layui-bg-gray"> <hr class="layui-bg-gray">
<div class="layui-footer text-white"> <div class="layui-footer text-white">
<!-- 底部固定区域 --> <!-- 底部固定区域 -->
&copy;2020-2023 &copy;2020-2024
<span class="java110-company-team"></span> <span class="java110-company-team"></span>
</div> </div>