no message

This commit is contained in:
小陌 2023-11-21 19:05:35 +08:00
parent 54f15f1504
commit e242e86acd
4 changed files with 31 additions and 31 deletions

View File

@ -31,7 +31,7 @@
:size="op.size || 'small'"
:link="op.link"
:icon="op.icon"
:circle="op.circle || false"
:circle="op.circle || false"
v-if="value === row[item.name]">
{{ op.label }}
</el-button>
@ -39,17 +39,17 @@
</p>
<p v-else-if="item.columntype=='button'">
<el-button
@click="handleClick(row, item)"
:type="item.options.type || 'warning'"
:size="item.options.size || 'small'"
:circle="item.options.circle || false"
<el-button
@click="handleClick(row, item)"
:type="item.options.type || 'warning'"
:size="item.options.size || 'small'"
:circle="item.options.circle || false"
:icon="item.options.icon"> {{ row[item.name] }} </el-button>
</p>
<p v-else-if="item.columntype=='tag' || item.columntype=='time'" @click="handleClick(row, item)" v-time.tip="row[item.name]"></p>
<slot v-else :name="item.name" v-bind="scope">
<slot v-else :name="item.name">
{{ item.columntype=='select' && item.options && item.options.items ? getNameByValue( row[item.name], item.options.items ) : row[item.name] }}
</slot>
</div>
@ -73,7 +73,7 @@
//
else if (item.update && (item.update.url || item.update.name)) {
this.$emit('xtableupdate', row, {
name:item.update.name || item.name,
name:item.update.name || item.name,
remoteurl: item.update.url || 'table/getUpdate?name='+item.update.name
}, item.update.type || 'dialog', 'update');
return ;
@ -81,7 +81,7 @@
//
else if (item.table && (item.table.url || item.table.name)) {
this.$emit('xtableupdate', row, {
name:item.table.name || item.name,
name:item.table.name || item.name,
remoteurl: item.table.url || 'table/get?name='+item.table.name
}, item.table.type || 'dialog', 'table');
return ;

View File

@ -6,14 +6,14 @@
<template v-for="(item, index) in column" :key="index">
<el-table-column :align="item.align || 'left'" :label="item.label" v-if="item.column && item.column.length>0">
<el-table-column v-for="(items, indexs) in item.column" :key="indexs" :align="items.align || 'left'" :column-key="items.prop||items.name" :label="items.label" :prop="items.prop||items.name" :width="items.width || 'auto'" :min-width="items.minWidth || 'auto'" :sortable="items.sortable" :fixed="items.fixed" :filters="items.filters" :filter-method="remoteFilter||!items.filters?null:filterHandler" :show-overflow-tooltip="items.showOverflowTooltip">
<template #default="scope">
<columnItem :row="scope.row" :item="items" @xtableupdate="xtableupdate"> </columnItem>
<template #default="{ row }">
<columnItem :row="row" :item="items" @xtableupdate="xtableupdate"> </columnItem>
</template>
</el-table-column>
</el-table-column>
<el-table-column v-else-if="!item.hide && (item.name || item.prop)" :align="item.align || 'left'" :column-key="item.prop||item.name" :label="item.label" :prop="item.prop||item.name" :width="item.width || 'auto'" :min-width="item.minWidth || 'auto'" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="remoteFilter||!item.filters?null:filterHandler" :show-overflow-tooltip="item.showOverflowTooltip">
<template #default="scope">
<columnItem :row="scope.row" :item="item" @xtableupdate="xtableupdate"> </columnItem>
<template #default="{ row }">
<columnItem :row="row" :item="item" @xtableupdate="xtableupdate"> </columnItem>
</template>
</el-table-column>
</template>
@ -85,7 +85,7 @@
props: {
name: { type: String, default: "" },
tableColumn: { type: Object, default: () => {} },
api: { type: Object, default: () => {} },
api: { type: String, default: () => {} },
apiObj: { type: Object, default: () => {} },
params: { type: Object, default: () => ({}) },
data: { type: Object, default: () => {} },
@ -177,7 +177,7 @@
this.$refs.xTable.doLayout()
}
},
deactivated(){
deactivated(){
this.isActivat = false;
},
methods: {
@ -188,9 +188,9 @@
this.$nextTick(() => {
this.$refs.xtableupdate.open().getComponentType(componenttype).setData(row).setConfig(options);
})
return ;
return ;
}
this.xtabledialog = options.name || this.name;
this.$nextTick(() => {
this.$refs.xtabledialog.open().setData(row).getComponentType(componenttype).setConfig(options);
@ -215,7 +215,7 @@
try {
var xawait = this.api ? this.$http.get(this.api, reqData) : this.apiObj(reqData);
xawait.then((res) => {
xawait.then((res) => {
try {
var response = config.parseData(res);
}catch(error){

View File

@ -280,7 +280,7 @@
this.$router.push({path: route.path})
return ;
}
if (route.children.length > 0) {
this.getchildren(route.children[0]);
}

View File

@ -31,16 +31,16 @@
</el-header>
<el-main class="nopadding">
<xTable
ref="table"
:tableColumn="column"
:name="tablename"
:params="search"
:api="api"
:row-key="key"
@selection-change="selectionChange"
:remoteSort="true"
:remoteFilter="true"
<xTable
ref="table"
:tableColumn="column"
:name="tablename"
:params="search"
:api="api"
:row-key="key"
@selection-change="selectionChange"
:remoteSort="true"
:remoteFilter="true"
stripe>
<el-table-column v-if="isselection" type="selection" width="50"></el-table-column>
<el-table-column :label="operation.label || '操作'" :width="operation.width || 124" :fixed="operation.fixed || 'right'" :align="operation.align || 'left'" v-if="operation.edit || operation.delete">
@ -57,7 +57,7 @@
</el-table-column>
</xTable>
</el-main>
</el-container>
</el-container>
</el-container>
<x-update v-if="dialog.save" :column="column" :name="key" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></x-update>
<x-stat v-if="dialog.stat" ref="xstatdialog" @closed="dialog.stat=false"></x-stat>
@ -68,7 +68,7 @@
import xFilterBar from '@/components/xFilterBar';
import xEcharts from '@/components/xEcharts'
export default {
name: 'propertyAuth',
name: 'systemTable',
components: {
xStat,
xEcharts,