提交 0ecd8ed7 编写于 作者: ibizdev's avatar ibizdev

ShineKOT 发布系统代码 [后台服务,演示应用]

上级 5d9e4a00
...@@ -76,6 +76,7 @@ export default { ...@@ -76,6 +76,7 @@ export default {
}, },
rowedit_grid: { rowedit_grid: {
columns: { columns: {
ibizbookid: "图书标识",
ibizbookname: "图书名称", ibizbookname: "图书名称",
author: "图书作者", author: "图书作者",
type: "图书类型", type: "图书类型",
......
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
}, },
rowedit_grid: { rowedit_grid: {
columns: { columns: {
ibizbookid: "图书标识",
ibizbookname: "图书名称", ibizbookname: "图书名称",
author: "图书作者", author: "图书作者",
type: "图书类型", type: "图书类型",
......
...@@ -21,6 +21,18 @@ ...@@ -21,6 +21,18 @@
<template v-if="!isSingleSelect"> <template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column> <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template> </template>
<template v-if="getColumnState('ibizbookid')">
<el-table-column show-overflow-tooltip :prop="'ibizbookid'" :label="$t('entities.ibizbook.rowedit_grid.columns.ibizbookid')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.ibizbook.rowedit_grid.columns.ibizbookid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.ibizbookid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('ibizbookname')"> <template v-if="getColumnState('ibizbookname')">
<el-table-column show-overflow-tooltip :prop="'ibizbookname'" :label="$t('entities.ibizbook.rowedit_grid.columns.ibizbookname')" :width="200" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'ibizbookname'" :label="$t('entities.ibizbook.rowedit_grid.columns.ibizbookname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
...@@ -717,6 +729,15 @@ export default class RowEditBase extends Vue implements ControlInterface { ...@@ -717,6 +729,15 @@ export default class RowEditBase extends Vue implements ControlInterface {
* @memberof RowEditBase * @memberof RowEditBase
*/ */
public allColumns: any[] = [ public allColumns: any[] = [
{
name: 'ibizbookid',
label: '图书标识',
langtag: 'entities.ibizbook.rowedit_grid.columns.ibizbookid',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{ {
name: 'ibizbookname', name: 'ibizbookname',
label: '图书名称', label: '图书名称',
...@@ -1461,7 +1482,7 @@ export default class RowEditBase extends Vue implements ControlInterface { ...@@ -1461,7 +1482,7 @@ export default class RowEditBase extends Vue implements ControlInterface {
* @memberof RowEditBase * @memberof RowEditBase
*/ */
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) { public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = ['ibizbookname','author','type','press','price']; let allColumns:Array<any> = ['ibizbookid','ibizbookname','author','type','press','price'];
if(row && row.children && row.children.length>0) { if(row && row.children && row.children.length>0) {
if(columnIndex == (this.isSingleSelect ? 0:1)) { if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1]; return [1, allColumns.length+1];
...@@ -1504,6 +1525,7 @@ export default class RowEditBase extends Vue implements ControlInterface { ...@@ -1504,6 +1525,7 @@ export default class RowEditBase extends Vue implements ControlInterface {
const tree: any ={ const tree: any ={
groupById: Number((groupIndex+1)*10), groupById: Number((groupIndex+1)*10),
group: group, group: group,
ibizbookid:'',
ibizbookname:'', ibizbookname:'',
author:'', author:'',
type:'', type:'',
...@@ -1926,10 +1948,16 @@ export default class RowEditBase extends Vue implements ControlInterface { ...@@ -1926,10 +1948,16 @@ export default class RowEditBase extends Vue implements ControlInterface {
}); });
} }
} else if(Object.is(errorMessage[index].data.errorKey, 'DuplicateKeyException')){ } else if(Object.is(errorMessage[index].data.errorKey, 'DuplicateKeyException')){
this.$Notice.error({ let name: string = this.service.getNameByProp("ibizbookid");
title: (this.$t('app.commonWords.saveFailed') as string), if(name){
desc: errorMessage[index].data.message?errorMessage[index].data.message:(this.$t('app.commonWords.sysException') as string), let desc: any = this.allColumns.find((column: any) =>{
}); return Object.is(column.name, name);
});
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: (desc ? desc.label : '') + " : " + item[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
}
}else { }else {
this.$Notice.error({ this.$Notice.error({
title: (this.$t('app.commonWords.saveFailed') as string), title: (this.$t('app.commonWords.saveFailed') as string),
...@@ -2039,6 +2067,7 @@ export default class RowEditBase extends Vue implements ControlInterface { ...@@ -2039,6 +2067,7 @@ export default class RowEditBase extends Vue implements ControlInterface {
return; return;
} }
let tempContext: any = this.$util.deepCopy(this.context); let tempContext: any = this.$util.deepCopy(this.context);
Object.is(tempContext, { ibizbook: data.ibizbookid });
const arg: any = JSON.parse(JSON.stringify(data)); const arg: any = JSON.parse(JSON.stringify(data));
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(tempContext)),arg, showloading); const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(tempContext)),arg, showloading);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册