no message
This commit is contained in:
parent
e41099397d
commit
05d0cf00b9
@ -1,6 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<sc-table-select v-model="value" :api="item.api" :data="item.data" :table-width="600" :multiple="item.options.multiple" :props="item.options.props" style="width: 100%;">
|
<sc-table-select v-model="value" v-bind="item.options" style="width: 100%;">
|
||||||
<el-table-column v-for="(_item, _index) in item.options.column" :key="_index" :prop="_item.prop" :label="_item.label" :width="_item.width"></el-table-column>
|
<template #header="{data, form, submit}">
|
||||||
|
<el-form :inline="true" :model="data" v-if="form && form.length>0">
|
||||||
|
<el-form-item style="margin-bottom:0px;" v-for="(i,index) in form" :key="index">
|
||||||
|
<el-input v-model="data[i.name]" :placeholder="i.placeholder"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="margin-bottom:0px;">
|
||||||
|
<el-button type="primary" @click="submit">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table-column v-for="(_item, _index) in item.options.column" :key="_index" v-bind="_item"></el-table-column>
|
||||||
</sc-table-select>
|
</sc-table-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Descripttion: 表格选择器组件
|
* @Descripttion: 表格选择器组件
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-select ref="select" v-model="defaultValue" :size="size" :clearable="clearable" :multiple="multiple" :collapse-tags="collapseTags" :collapse-tags-tooltip="collapseTagsTooltip" :filterable="filterable" :placeholder="placeholder" :disabled="disabled" :filter-method="filterMethod" @remove-tag="removeTag" @visible-change="visibleChange" @clear="clear">
|
<el-select ref="select" v-model="defaultValue" :size="size" :clearable="clearable" :multiple="multiple" :collapse-tags="collapseTags" :collapse-tags-tooltip="collapseTagsTooltip" :filterable="filterable" :placeholder="placeholder" :disabled="disabled" :filter-method="filterMethod" @remove-tag="removeTag" @visible-change="visibleChange" @clear="clear">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="sc-table-select__table" :style="{width: tableWidth+'px'}" v-loading="loading">
|
<div class="sc-table-select__table" v-loading="loading">
|
||||||
<div class="sc-table-select__header">
|
<div class="sc-table-select__header">
|
||||||
<slot name="header" :form="formData" :submit="formSubmit"></slot>
|
<slot name="header" :data="formData" :form="form" :submit="formSubmit"></slot>
|
||||||
</div>
|
</div>
|
||||||
<el-table ref="table" :data="tableData" :height="245" :highlight-current-row="!multiple" @row-click="click" @select="select" @select-all="selectAll">
|
<el-table ref="table" :data="tableData" :height="245" :highlight-current-row="!multiple" @row-click="click" @select="select" @select-all="selectAll">
|
||||||
<el-table-column v-if="multiple" type="selection" width="45"></el-table-column>
|
<el-table-column v-if="multiple" type="selection" width="55"></el-table-column>
|
||||||
<el-table-column v-else type="index" width="45">
|
<el-table-column v-else type="index" width="55">
|
||||||
<template #default="scope"><span>{{scope.$index+(currentPage - 1) * limit + 1}}</span></template>
|
<template #default="scope"><span>{{scope.$index+(currentPage - 1) * limit + 1}}</span></template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@ -32,6 +31,7 @@
|
|||||||
modelValue: null,
|
modelValue: null,
|
||||||
api: { type: String, default: '' },
|
api: { type: String, default: '' },
|
||||||
params: { type: Object, default: () => {} },
|
params: { type: Object, default: () => {} },
|
||||||
|
form: { type: Array, default: () => [] },
|
||||||
placeholder: { type: String, default: "请选择" },
|
placeholder: { type: String, default: "请选择" },
|
||||||
size: { type: String, default: "default" },
|
size: { type: String, default: "default" },
|
||||||
clearable: { type: Boolean, default: false },
|
clearable: { type: Boolean, default: false },
|
||||||
@ -40,7 +40,6 @@
|
|||||||
collapseTags: { type: Boolean, default: false },
|
collapseTags: { type: Boolean, default: false },
|
||||||
collapseTagsTooltip: { type: Boolean, default: false },
|
collapseTagsTooltip: { type: Boolean, default: false },
|
||||||
disabled: { type: Boolean, default: false },
|
disabled: { type: Boolean, default: false },
|
||||||
tableWidth: {type: Number, default: 400},
|
|
||||||
mode: { type: String, default: "popover" },
|
mode: { type: String, default: "popover" },
|
||||||
props: { type: Object, default: () => {} }
|
props: { type: Object, default: () => {} }
|
||||||
},
|
},
|
||||||
@ -101,13 +100,19 @@
|
|||||||
[this.defaultProps.keyword]: this.keyword
|
[this.defaultProps.keyword]: this.keyword
|
||||||
}
|
}
|
||||||
Object.assign(reqData, this.params, this.formData)
|
Object.assign(reqData, this.params, this.formData)
|
||||||
var res = await this.$http.get(this.api, reqData);
|
var res = await this.$http.get(this.api, reqData, {cacheparameters:1});
|
||||||
var parseData = config.parseData(res)
|
var parseData = config.parseData(res)
|
||||||
this.tableData = parseData.rows;
|
this.tableData = parseData.rows;
|
||||||
this.total = parseData.total;
|
this.total = parseData.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
//表格默认赋值
|
//表格默认赋值
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
||||||
|
if(typeof this.defaultValue === 'undefined'){
|
||||||
|
this.defaultValue = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(this.multiple){
|
if(this.multiple){
|
||||||
this.defaultValue.forEach(row => {
|
this.defaultValue.forEach(row => {
|
||||||
var setrow = this.tableData.filter(item => item[this.defaultProps.value]===row[this.defaultProps.value] )
|
var setrow = this.tableData.filter(item => item[this.defaultProps.value]===row[this.defaultProps.value] )
|
||||||
@ -139,9 +144,10 @@
|
|||||||
this.$refs.select.selected.forEach(item => {
|
this.$refs.select.selected.forEach(item => {
|
||||||
item.currentLabel = item.value[this.defaultProps.label]
|
item.currentLabel = item.value[this.defaultProps.label]
|
||||||
})
|
})
|
||||||
}else{
|
return ;
|
||||||
this.$refs.select.selectedLabel = this.defaultValue[this.defaultProps.label]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$refs.select.selectedLabel = typeof this.defaultValue === 'object' ? this.defaultValue[this.defaultProps.label]: this.defaultValue
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//表格勾选事件
|
//表格勾选事件
|
||||||
|
@ -16,7 +16,7 @@ export default {
|
|||||||
keyword: 'keyword' //规定搜索字段
|
keyword: 'keyword' //规定搜索字段
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
label: 'label', //映射label显示字段
|
label: 'label', // 映射label显示字段
|
||||||
value: 'value', //映射value值字段
|
value: 'value', // 映射value值字段
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,7 +39,7 @@
|
|||||||
.adminui-main > .el-container > .el-container {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-container {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
.adminui-main > .el-container > .el-container + .el-aside {border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-container + .el-aside {border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
.adminui-main > .el-container > .el-header {@extend .headerPublic;}
|
.adminui-main > .el-container > .el-header {@extend .headerPublic;}
|
||||||
.adminui-main > .el-container > .el-main.nopadding {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-main.nopadding {}
|
||||||
.adminui-main > .el-container > .el-main + .el-aside {border-left: 0!important;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-main + .el-aside {border-left: 0!important;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
.adminui-main > .el-container > .el-footer {margin-top: 15px;border-bottom: 1px solid var(--el-border-color-light);}
|
.adminui-main > .el-container > .el-footer {margin-top: 15px;border-bottom: 1px solid var(--el-border-color-light);}
|
||||||
.adminui-main > .el-container > .el-container > .el-header {@extend .headerPublic}
|
.adminui-main > .el-container > .el-container > .el-header {@extend .headerPublic}
|
||||||
|
@ -17,7 +17,10 @@ axios.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
if (!sysConfig.REQUEST_CACHE && config.method == 'get') {
|
if (!sysConfig.REQUEST_CACHE && config.method == 'get') {
|
||||||
config.params = config.params || {};
|
config.params = config.params || {};
|
||||||
config.params['_'] = new Date().getTime();
|
|
||||||
|
if (!config.cacheparameters) {
|
||||||
|
config.params['_'] = new Date().getTime();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Object.assign(config.headers, sysConfig.HEADERS)
|
Object.assign(config.headers, sysConfig.HEADERS)
|
||||||
return config;
|
return config;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="3"><span>1</span></el-col>
|
<el-col :span="3"></el-col>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-button type="primary" @click="submit" style="max-width: 500px; width: 100%;" :loading="submitloading">保存</el-button>
|
<el-button type="primary" @click="submit" style="max-width: 500px; width: 100%;" :loading="submitloading">保存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -42,6 +42,9 @@
|
|||||||
scEcharts,
|
scEcharts,
|
||||||
scStatistic,
|
scStatistic,
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
name: { type: String, default: "" },
|
||||||
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
dateGroup: [
|
dateGroup: [
|
||||||
@ -61,11 +64,13 @@
|
|||||||
},
|
},
|
||||||
dateType: '',
|
dateType: '',
|
||||||
date: null,
|
date: null,
|
||||||
|
statName: this.$route.meta.tablename,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
//监听从props里拿到值了
|
//监听从props里拿到值了
|
||||||
date(){
|
date(){
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -73,6 +78,10 @@
|
|||||||
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
||||||
lastDay.setHours(23, 59, 0, 0);
|
lastDay.setHours(23, 59, 0, 0);
|
||||||
this.date = [new Date(now.getFullYear(), now.getMonth(), 1, 0, 0), lastDay];
|
this.date = [new Date(now.getFullYear(), now.getMonth(), 1, 0, 0), lastDay];
|
||||||
|
|
||||||
|
if (this.name) {
|
||||||
|
this.statName = this.name || this.$route.meta.tablename;
|
||||||
|
}
|
||||||
this.loaddata();
|
this.loaddata();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -90,11 +99,10 @@
|
|||||||
},
|
},
|
||||||
loaddata(){
|
loaddata(){
|
||||||
//判断是否开启自定义列
|
//判断是否开启自定义列
|
||||||
if(this.$route.meta.tablename) {
|
if(this.statName) {
|
||||||
this.$http.get('system/stat/get', { name: this.$route.meta.tablename,date:this.date }, { cache:this.$route.meta.tablecache || 0 }).then((res) => {
|
this.$http.get('system/stat/get', { name: this.statName,date:this.date }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
Object.assign(this.$data, res.data);
|
Object.assign(this.$data, res.data);
|
||||||
|
|
||||||
this.dateType = '';
|
this.dateType = '';
|
||||||
this.dateGroup.forEach((item) => {
|
this.dateGroup.forEach((item) => {
|
||||||
if (new Date(item.value[0]).getTime()==new Date(this.date[0]).getTime() && new Date(item.value[1]).getTime()==new Date(this.date[1]).getTime()) {
|
if (new Date(item.value[0]).getTime()==new Date(this.date[0]).getTime() && new Date(item.value[1]).getTime()==new Date(this.date[1]).getTime()) {
|
||||||
@ -105,11 +113,9 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-card {margin-bottom: 15px;}
|
.el-card {margin-bottom: 15px;}
|
||||||
.number-data {display: flex;}
|
.number-data {display: flex;}
|
||||||
|
68
src/views/system/table/dialog.vue
Normal file
68
src/views/system/table/dialog.vue
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="titleMap[mode]" v-model="visible" :size="960" destroy-on-close @closed="$emit('closed')">
|
||||||
|
<el-container v-loading="loading">
|
||||||
|
<el-main style="padding:0 20px 20px 20px">
|
||||||
|
<sc-form ref="formref" :config="config" v-model="info" :loading="loading"> </sc-form>
|
||||||
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||||
|
<el-button @click="visible=false">取消</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
emits: ['success', 'closed'],
|
||||||
|
props: {
|
||||||
|
column: { type: Object, default: () => {} },
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
mode: "plus",
|
||||||
|
titleMap: {
|
||||||
|
plus: '新增',
|
||||||
|
edit: '编辑'
|
||||||
|
},
|
||||||
|
info: {},
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
column(){
|
||||||
|
this.config.column = this.column;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.config = {
|
||||||
|
formItems : this.column,
|
||||||
|
labelPosition : "right",
|
||||||
|
labelWidth : "120px",
|
||||||
|
size : "medium",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//显示
|
||||||
|
open(mode='add'){
|
||||||
|
this.mode = mode;
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//表单提交方法
|
||||||
|
submit(){
|
||||||
|
this.$refs.formref.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// this.isSaveing = true;
|
||||||
|
this.$emit('success', this.info, this.mode);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(info){
|
||||||
|
this.info = info;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -11,6 +11,7 @@
|
|||||||
<el-button v-if="operation.batchdeletion" type="danger" @click="batchdeletion" plain icon="el-icon-delete"></el-button>
|
<el-button v-if="operation.batchdeletion" type="danger" @click="batchdeletion" plain icon="el-icon-delete"></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel" v-if="operation.search || filter.length>0">
|
<div class="right-panel" v-if="operation.search || filter.length>0">
|
||||||
|
<el-button v-for="(s,index) in statList" :key="index" :type="s.type" @click="openStat(s)" plain :icon="s.icon">{{ s.title }}</el-button>
|
||||||
<scFilterBar v-if="filter.length>0" :filterName="$route.meta.tablename" :options="filter" @filterChange="filterChange">
|
<scFilterBar v-if="filter.length>0" :filterName="$route.meta.tablename" :options="filter" @filterChange="filterChange">
|
||||||
<template #default="{filterLength, openFilter}">
|
<template #default="{filterLength, openFilter}">
|
||||||
<el-badge :value="filterLength" type="danger" :hidden="filterLength<=0">
|
<el-badge :value="filterLength" type="danger" :hidden="filterLength<=0">
|
||||||
@ -24,6 +25,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
|
|
||||||
|
<el-header style="height:120px;" v-if="typeof chartoption === 'object' && Object.keys(chartoption).length > 0">
|
||||||
|
<scEcharts height="100%" :option="chartoption"></scEcharts>
|
||||||
|
</el-header>
|
||||||
|
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :tableColumn="column" :params="search" :columnSetting="columnSetting" :api="api" :row-key="key" @selection-change="selectionChange" :remoteSort="true" :remoteFilter="true" stripe>
|
<scTable ref="table" :tableColumn="column" :params="search" :columnSetting="columnSetting" :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 v-if="isselection" type="selection" width="50"></el-table-column>
|
||||||
@ -42,24 +48,36 @@
|
|||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
<save-dialog v-if="dialog.save" :column="column" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></save-dialog>
|
<save-dialog v-if="dialog.save" :column="column" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></save-dialog>
|
||||||
|
<edit-dialog v-if="dialog.edit" :column="column" ref="editDialog" @success="handleSuccess" @closed="dialog.edit=false"></edit-dialog>
|
||||||
|
<stat-dialog v-if="dialog.stat" ref="statDialog" @closed="dialog.stat=false"></stat-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from './save'
|
import saveDialog from './save'
|
||||||
|
import statDialog from './stat'
|
||||||
|
import editDialog from './dialog'
|
||||||
import scFilterBar from '@/components/scFilterBar';
|
import scFilterBar from '@/components/scFilterBar';
|
||||||
|
import scEcharts from '@/components/scEcharts'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'propertyAuth',
|
name: 'propertyAuth',
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
|
statDialog,
|
||||||
|
scEcharts,
|
||||||
|
editDialog,
|
||||||
scFilterBar
|
scFilterBar
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
stat: false,
|
||||||
|
edit: false,
|
||||||
},
|
},
|
||||||
columnSetting:false,
|
columnSetting:false,
|
||||||
isselection:true,
|
isselection:true,
|
||||||
@ -76,6 +94,8 @@
|
|||||||
tabs: [
|
tabs: [
|
||||||
// {label:'所有', value:0},
|
// {label:'所有', value:0},
|
||||||
],
|
],
|
||||||
|
statList:[],
|
||||||
|
chartoption: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -123,22 +143,29 @@
|
|||||||
this.$refs.saveDialog.open();
|
this.$refs.saveDialog.open();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//打开统计
|
||||||
|
openStat(o){
|
||||||
|
this.dialog.stat = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.statDialog.open().setData(o);
|
||||||
|
})
|
||||||
|
},
|
||||||
//编辑
|
//编辑
|
||||||
operationEdit(row,index){
|
operationEdit(row,index){
|
||||||
this.dialog.save = true
|
this.dialog.edit = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.operation.edit.remoteurl) {
|
if (this.operation.edit.remoteurl) {
|
||||||
setTimeout(async ()=>{
|
setTimeout(async ()=>{
|
||||||
var res = await this.$http.get(this.operation.edit.remoteurl, {[this.key]: row[this.key], index: index})
|
var res = await this.$http.get(this.operation.edit.remoteurl, {[this.key]: row[this.key], index: index})
|
||||||
if (res.code == 200 ) {
|
if (res.code == 200 ) {
|
||||||
this.$refs.saveDialog.open('edit').setData(res.data);
|
this.$refs.editDialog.open('edit').setData(res.data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$alert(res.message, "提示", {type: 'error'});
|
this.$alert(res.message, "提示", {type: 'error'});
|
||||||
}, 100)
|
}, 100)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$refs.saveDialog.open('edit').setData(row)
|
this.$refs.editDialog.open('edit').setData(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-drawer :title="titleMap[mode]" v-model="visible" :size="1000" destroy-on-close @closed="$emit('closed')">
|
<el-drawer :title="titleMap[mode]" v-model="visible" :size="960" destroy-on-close @closed="$emit('closed')">
|
||||||
<el-container v-loading="loading">
|
<el-container v-loading="loading">
|
||||||
<el-main style="padding:0 20px 20px 20px">
|
<el-main style="padding:0 20px 20px 20px">
|
||||||
<sc-form ref="formref" :config="config" v-model="info" :loading="loading"> </sc-form>
|
<sc-form ref="formref" :config="config" v-model="info" :loading="loading"> </sc-form>
|
||||||
@ -11,11 +11,6 @@
|
|||||||
</el-container>
|
</el-container>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
emits: ['success', 'closed'],
|
emits: ['success', 'closed'],
|
||||||
@ -70,7 +65,4 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
32
src/views/system/table/stat.vue
Normal file
32
src/views/system/table/stat.vue
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer :title="info.title" v-model="visible" :size="1000" destroy-on-close @closed="$emit('closed')">
|
||||||
|
<stat :name="info.value || info.name"></stat>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import stat from '@/views/system/stat';
|
||||||
|
export default {
|
||||||
|
emits: ['success', 'closed'],
|
||||||
|
props: {},
|
||||||
|
components: {
|
||||||
|
stat,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
info: {},
|
||||||
|
visible: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//显示
|
||||||
|
open(){
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(info){
|
||||||
|
this.info = info;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user