mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
导入模板加入说明
This commit is contained in:
parent
04c11e59ec
commit
b8ea0ab455
@ -1,4 +1,5 @@
|
||||
<div id = "addMappingModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
|
||||
<div id="addMappingModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
@ -20,38 +21,45 @@
|
||||
</div>-->
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">域</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.domain" type="text" placeholder="必填,请填写域" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.name" type="text" placeholder="必填,请填写名称" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">键</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.key" type="text" placeholder="必填,请填写键" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">值</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.value" type="text" placeholder="必填,请填写值" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea placeholder="选填,请填写备注" class="form-control" v-model="addMappingInfo.remark"></textarea> </div>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label">域</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.domain" type="text" placeholder="必填,请填写域"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.name" type="text" placeholder="必填,请填写名称"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">键</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.key" type="text" placeholder="必填,请填写键"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">值</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addMappingInfo.value" type="text" placeholder="必填,请填写值"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea placeholder="选填,请填写备注" class="form-control"
|
||||
v-model="addMappingInfo.remark"></textarea> </div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveMappingInfo()" ><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveMappingInfo()"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,4 +67,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,82 +1,82 @@
|
||||
(function(vc){
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
addMappingInfo:{
|
||||
domain:'DOMAIN.COMMON',
|
||||
name:'',
|
||||
key:'',
|
||||
value:'',
|
||||
remark:'',
|
||||
data: {
|
||||
addMappingInfo: {
|
||||
domain: 'DOMAIN.COMMON',
|
||||
name: '',
|
||||
key: '',
|
||||
value: '',
|
||||
remark: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('addMapping','openAddMappingModal',function(){
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addMapping', 'openAddMappingModal', function () {
|
||||
$('#addMappingModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
addMappingValidate(){
|
||||
methods: {
|
||||
addMappingValidate() {
|
||||
return vc.validate.validate({
|
||||
addMappingInfo:vc.component.addMappingInfo
|
||||
},{
|
||||
'addMappingInfo.domain':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"域不能为空"
|
||||
addMappingInfo: vc.component.addMappingInfo
|
||||
}, {
|
||||
'addMappingInfo.domain': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "域不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"50",
|
||||
errInfo:"域长度不能超过50"
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "50",
|
||||
errInfo: "域长度不能超过50"
|
||||
},
|
||||
],
|
||||
'addMappingInfo.name':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"名称不能为空"
|
||||
'addMappingInfo.name': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "名称不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxin",
|
||||
param:"2,50",
|
||||
errInfo:"名称必须在2至50字符之间"
|
||||
{
|
||||
limit: "maxin",
|
||||
param: "2,50",
|
||||
errInfo: "名称必须在2至50字符之间"
|
||||
},
|
||||
],
|
||||
'addMappingInfo.key':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"键不能为空"
|
||||
'addMappingInfo.key': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "键不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxin",
|
||||
param:"1,100",
|
||||
errInfo:"键必须在1至100之间"
|
||||
{
|
||||
limit: "maxin",
|
||||
param: "1,100",
|
||||
errInfo: "键必须在1至100之间"
|
||||
},
|
||||
],
|
||||
'addMappingInfo.value':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"值不能为空"
|
||||
'addMappingInfo.value': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "值不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxin",
|
||||
param:"1,100",
|
||||
errInfo:"值必须在1至100之间"
|
||||
{
|
||||
limit: "maxin",
|
||||
param: "1,100",
|
||||
errInfo: "值必须在1至100之间"
|
||||
},
|
||||
],
|
||||
'addMappingInfo.remark':[
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"200",
|
||||
errInfo:"备注内容不能超过200"
|
||||
'addMappingInfo.remark': [
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "200",
|
||||
errInfo: "备注内容不能超过200"
|
||||
},
|
||||
],
|
||||
|
||||
@ -85,11 +85,11 @@ remark:'',
|
||||
|
||||
});
|
||||
},
|
||||
saveMappingInfo:function(){
|
||||
if(!vc.component.addMappingValidate()){
|
||||
saveMappingInfo: function () {
|
||||
if (!vc.component.addMappingValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
//vc.component.addMappingInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
@ -99,37 +99,37 @@ remark:'',
|
||||
'save',
|
||||
JSON.stringify(vc.component.addMappingInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if(res.status == 200){
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
$('#addMappingModel').modal('hide');
|
||||
vc.component.clearAddMappingInfo();
|
||||
vc.emit('mappingManage','listMapping',{});
|
||||
vc.emit('mappingManage', 'listMapping', {});
|
||||
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
|
||||
},
|
||||
function(errInfo,error){
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
clearAddMappingInfo:function(){
|
||||
clearAddMappingInfo: function () {
|
||||
vc.component.addMappingInfo = {
|
||||
domain:'DOMAIN.COMMON',
|
||||
name:'',
|
||||
key:'',
|
||||
value:'',
|
||||
remark:'',
|
||||
domain: 'DOMAIN.COMMON',
|
||||
name: '',
|
||||
key: '',
|
||||
value: '',
|
||||
remark: '',
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Binary file not shown.
BIN
public/import/hc20200610.xlsx
Normal file
BIN
public/import/hc20200610.xlsx
Normal file
Binary file not shown.
@ -17,9 +17,10 @@
|
||||
vc.component._queryIndexContextData();
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on("indexContext","_queryIndexContextData",function(){
|
||||
vc.on("indexContext","_queryIndexContextData",function(_param){
|
||||
vc.component._queryIndexContextData();
|
||||
});
|
||||
|
||||
},
|
||||
methods:{
|
||||
_queryIndexContextData:function(){
|
||||
@ -33,7 +34,6 @@
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('indexContext',
|
||||
'getData',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user