提交 0261fc0b 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--表格外部校验

上级 91bff909
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<#-- BEGIN:数据列 --> <#-- BEGIN:数据列 -->
<el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>> <el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>>
<@getColumnHeader item 8 /> <@getColumnHeader item 8 />
<template v-slot="{row,column}"> <template v-slot="{row,column,$index}">
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()> <#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()>
<#-- BEGIN:列绘制、前端绘制代码表、行编辑 --> <#-- BEGIN:列绘制、前端绘制代码表、行编辑 -->
<#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())> <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>
...@@ -101,11 +101,9 @@ ...@@ -101,11 +101,9 @@
<#-- END:列绘制 --> <#-- END:列绘制 -->
<#else> <#else>
<template v-if="actualIsOpenEdit"> <template v-if="actualIsOpenEdit">
<i-form style="height:100%;" :model="row"> <app-form-item :error="gridItemsModel[$index][column.property].error">
<app-form-item :name="column.property" :itemRules="rules[column.property]">
${P.getEditorCode(item, "GRIDEIDTOR.vue").code} ${P.getEditorCode(item, "GRIDEIDTOR.vue").code}
</app-form-item> </app-form-item>
</i-form>
</template> </template>
</#if> </#if>
<#-- END:行编辑 --> <#-- END:行编辑 -->
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<#if ctrl.render?? || ctrl.getRender()??> <#if ctrl.render?? || ctrl.getRender()??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<i-form>
<el-table v-if="isDisplay === true" <el-table v-if="isDisplay === true"
<#-- BEGIN:是否支持排序 --> <#-- BEGIN:是否支持排序 -->
<#if !ctrl.isNoSort()> <#if !ctrl.isNoSort()>
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
<el-table-column></el-table-column> <el-table-column></el-table-column>
</template> </template>
</el-table> </el-table>
</i-form>
<#if ctrl.isEnablePagingBar()> <#if ctrl.isEnablePagingBar()>
<row class='grid-pagination' v-show="items.length > 0"> <row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)" <page class='pull-right' @on-change="pageOnChange($event)"
...@@ -98,6 +100,7 @@ ...@@ -98,6 +100,7 @@
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -458,6 +461,28 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -458,6 +461,28 @@ import CodeListService from "@service/app/codelist-service";
</#if> </#if>
] ]
/**
* 表格模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public gridItemsModel: any[] = [];
/**
* 获取表格行模型
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getGridRowModel(){
return {
<#list ctrl.getPSDEGridEditItems() as edititem>
${edititem.getName()}: new FormItemModel(),
</#list>
}
}
/** /**
* 属性值规则 * 属性值规则
* *
...@@ -489,6 +514,23 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -489,6 +514,23 @@ import CodeListService from "@service/app/codelist-service";
</#list> </#list>
} }
/**
* 表格行编辑项校验
*
* @param {string} property 属性名
* @param {*} data 行数据
* @param {number} rowIndex 行索引
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public validtor(property:string, data:any, rowIndex:number){
this.$util.validateItem(property,data,this.rules).then(()=>{
this.gridItemsModel[rowIndex][property].setError(null);
}).catch(({ errors, fields }) => {
this.gridItemsModel[rowIndex][property].setError(errors[0].message);
});
}
/** /**
* 表格数据加载 * 表格数据加载
* *
...@@ -531,8 +573,10 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -531,8 +573,10 @@ import CodeListService from "@service/app/codelist-service";
const data: any = response.data; const data: any = response.data;
this.totalrow = response.total; this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data)); this.items = JSON.parse(JSON.stringify(data));
// 清空selections // 清空selections,gridItemsModel
this.selections = []; this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.$emit('load', this.items); this.$emit('load', this.items);
// 设置默认选中 // 设置默认选中
let _this = this; let _this = this;
...@@ -584,6 +628,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -584,6 +628,7 @@ import CodeListService from "@service/app/codelist-service";
this.items.some((val: any, num: number) =>{ this.items.some((val: any, num: number) =>{
if(JSON.stringify(val) == JSON.stringify(record)){ if(JSON.stringify(val) == JSON.stringify(record)){
this.items.splice(num,1); this.items.splice(num,1);
this.gridItemsModel.splice(num,1);
return true; return true;
} }
}); });
...@@ -636,6 +681,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -636,6 +681,7 @@ import CodeListService from "@service/app/codelist-service";
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
this.gridItemsModel.splice(index,1);
return true; return true;
} }
}); });
...@@ -1522,6 +1568,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1522,6 +1568,7 @@ import CodeListService from "@service/app/codelist-service";
const data = response.data; const data = response.data;
data.rowDataState = "create"; data.rowDataState = "create";
_this.items.push(data); _this.items.push(data);
_this.gridItemsModel.push(_this.getGridRowModel());
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -1541,7 +1588,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1541,7 +1588,7 @@ import CodeListService from "@service/app/codelist-service";
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public onGridItemValueChange(row: any,$event: { name: string, value: any }): void { public onGridItemValueChange(row: any,$event: { name: string, value: any },rowIndex: number): void {
if (!$event) { if (!$event) {
return; return;
} }
...@@ -1562,8 +1609,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1562,8 +1609,9 @@ import CodeListService from "@service/app/codelist-service";
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public gridEditItemChange(row: any, property: string, value: any){ public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){
row.rowDataState = row.rowDataState ? row.rowDataState : "update" ; row.rowDataState = row.rowDataState ? row.rowDataState : "update" ;
this.validtor(property,row,rowIndex);
<#if ctrl.getPSDEGridEditItems()??> <#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem> <#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSDEGridEditItemUpdate()??> <#if editItem.getPSDEGridEditItemUpdate()??>
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
type="text" type="text"
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if> <#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box> </input-box>
\ No newline at end of file
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></dropdown-list> <dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list>
\ No newline at end of file \ No newline at end of file
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></dropdown-list> <dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list>
\ No newline at end of file \ No newline at end of file
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}width: 100px;" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></dropdown-list> <dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}width: 100px;" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list>
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
<#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if> <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if>
</#if> </#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event)}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker> </dropdown-list-mpicker>
\ No newline at end of file
<app-radio-group v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}" <#if item.isNeedCodeListConfig()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' </#if> style="${item.getEditorCssStyle()}"></app-radio-group> <app-radio-group v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}" <#if item.isNeedCodeListConfig()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' </#if> style="${item.getEditorCssStyle()}"></app-radio-group>
\ No newline at end of file \ No newline at end of file
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
:data="JSON.stringify(row)" :data="JSON.stringify(row)"
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
......
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
:data="JSON.stringify(row)" :data="JSON.stringify(row)"
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</#if> </#if>
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</#if> </#if>
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
\ No newline at end of file
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></textarea> <textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div> </div>
\ No newline at end of file
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></textarea> <textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div> </div>
\ No newline at end of file
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" rows="10" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></textarea> <textarea class="ivu-input" rows="10" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div> </div>
\ No newline at end of file
<input-box type="password" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></input-box> <input-box type="password" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></input-box>
\ No newline at end of file \ No newline at end of file
<app-switch name='${editor.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-switch> <app-switch name='${editor.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-switch>
\ No newline at end of file \ No newline at end of file
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
type="number" type="number"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box> </input-box>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
editortype="" editortype=""
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
<@getItemRender editor /> <@getItemRender editor />
</app-picker> </app-picker>
</#if> </#if>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
:linkview=<@getLinkView editor /> :linkview=<@getLinkView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker-select-view> </app-picker-select-view>
</#if> </#if>
</#if> </#if>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
:value="row[column.property]" :value="row[column.property]"
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker-select-view> </app-picker-select-view>
</#if> </#if>
</#if> </#if>
\ No newline at end of file
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
:value="row[column.property]" :value="row[column.property]"
editortype="dropdown" editortype="dropdown"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
<@getItemRender editor /> <@getItemRender editor />
</app-picker> </app-picker>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)> <#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)>
refreshitems="${item.getResetItemName()}" refreshitems="${item.getResetItemName()}"
</#if> </#if>
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-embed-picker> </app-embed-picker>
</#if> </#if>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
:linkview=<@getLinkView editor /> :linkview=<@getLinkView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
<@getItemRender editor /> <@getItemRender editor />
</app-picker> </app-picker>
</#if> </#if>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
:linkview=<@getLinkView editor /> :linkview=<@getLinkView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
editortype="pickup-no-ac" editortype="pickup-no-ac"
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)> <#if item.getResetItemName()?? && (item.getResetItemName()?length gt 0)>
refreshitems="${item.getResetItemName()}" refreshitems="${item.getResetItemName()}"
</#if> </#if>
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-tree-picker> </app-tree-picker>
</#if> </#if>
\ No newline at end of file
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
editortype="linkonly" editortype="linkonly"
:linkview=<@getLinkView editor /> :linkview=<@getLinkView editor />
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker> </app-picker>
\ No newline at end of file
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
:data="JSON.stringify(row)" :data="JSON.stringify(row)"
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
:isdrag="true" :isdrag="true"
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
:data="JSON.stringify(row)" :data="JSON.stringify(row)"
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
......
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker> <date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
\ No newline at end of file \ No newline at end of file
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
\ No newline at end of file \ No newline at end of file
<app-stepper name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-stepper> <app-stepper name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event,$index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-stepper>
<app-slider name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-slider> <app-slider name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event,$index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-slider>
\ No newline at end of file \ No newline at end of file
<app-rate name='${item.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event; gridEditItemChange(row, column.property, $event)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-rate> <app-rate name='${item.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event; gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-rate>
\ No newline at end of file \ No newline at end of file
<div style="${item.getEditorCssStyle()}"> <div style="${item.getEditorCssStyle()}">
<app-checkbox :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"></app-checkbox> <app-checkbox :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"></app-checkbox>
</div> </div>
\ No newline at end of file
<app-checkbox-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if> mode="${codelist.getOrMode()?lower_case}"</#if> name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></app-checkbox-list> <app-checkbox-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if> mode="${codelist.getOrMode()?lower_case}"</#if> name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></app-checkbox-list>
\ No newline at end of file \ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册