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

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

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