查询升级
This commit is contained in:
parent
1c86d78d1e
commit
1feca37cd4
|
|
@ -61,7 +61,7 @@ export function exportType(query) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取字典选择框列表
|
// 获取字典选择框列表
|
||||||
export function optionselect() {
|
export function optionSelect() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/dict/type/optionselect',
|
url: '/system/dict/type/optionselect',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { praseStrEmpty } from "@/utils/hcy";
|
import { praseStrEmpty } from "@/utils/ebts";
|
||||||
|
|
||||||
// 查询用户列表
|
// 查询用户列表
|
||||||
export function listUser(query) {
|
export function listUser(query) {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,17 @@ import './assets/icons' // icon
|
||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
import { getDicts } from "@/api/system/dict/data";
|
import { getDicts } from "@/api/system/dict/data";
|
||||||
import { getConfigKey } from "@/api/system/config";
|
import { getConfigKey } from "@/api/system/config";
|
||||||
import { parseTime, resetForm, addDateRange, addCreateDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/hcy";
|
import {
|
||||||
|
parseTime,
|
||||||
|
resetForm,
|
||||||
|
addDateRange,
|
||||||
|
addCreateDateRange,
|
||||||
|
selectDictLabel,
|
||||||
|
selectDictLabels,
|
||||||
|
download,
|
||||||
|
handleTree,
|
||||||
|
parseDateOrTime, checkDateType
|
||||||
|
} from "@/utils/ebts";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
//自定义表格工具扩展
|
//自定义表格工具扩展
|
||||||
import RightToolbar from "@/components/RightToolbar"
|
import RightToolbar from "@/components/RightToolbar"
|
||||||
|
|
@ -32,6 +42,8 @@ Vue.prototype.addDateRange = addDateRange
|
||||||
Vue.prototype.selectDictLabel = selectDictLabel
|
Vue.prototype.selectDictLabel = selectDictLabel
|
||||||
Vue.prototype.addCreateDateRange = addCreateDateRange
|
Vue.prototype.addCreateDateRange = addCreateDateRange
|
||||||
Vue.prototype.selectDictLabels = selectDictLabels
|
Vue.prototype.selectDictLabels = selectDictLabels
|
||||||
|
Vue.prototype.parseDateOrTime = parseDateOrTime
|
||||||
|
Vue.prototype.checkDateType = checkDateType
|
||||||
Vue.prototype.download = download
|
Vue.prototype.download = download
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,20 @@
|
||||||
|
|
||||||
const baseURL = process.env.VUE_APP_BASE_API
|
const baseURL = process.env.VUE_APP_BASE_API
|
||||||
|
|
||||||
|
|
||||||
|
export function parseDateOrTime(time){
|
||||||
|
if (time){
|
||||||
|
return parseTime(new Date(time),'{y}-{m}-{d} {h}:{m}:{s}')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 检查是否为时间类型
|
||||||
|
* @param prop
|
||||||
|
*/
|
||||||
|
export function checkDateType(prop){
|
||||||
|
prop = prop.toLowerCase().replace('update','')
|
||||||
|
return !(-1 === prop.indexOf('date') && -1 === prop.indexOf('time'))
|
||||||
|
}
|
||||||
// 日期格式化
|
// 日期格式化
|
||||||
export function parseTime(time, pattern) {
|
export function parseTime(time, pattern) {
|
||||||
if (arguments.length === 0 || !time) {
|
if (arguments.length === 0 || !time) {
|
||||||
|
|
@ -55,7 +69,7 @@ export function resetForm(refName) {
|
||||||
|
|
||||||
// 添加日期范围
|
// 添加日期范围
|
||||||
export function addDateRange(params, dateRange) {
|
export function addDateRange(params, dateRange) {
|
||||||
var search = params;
|
let search = params;
|
||||||
search.beginTime = "";
|
search.beginTime = "";
|
||||||
search.endTime = "";
|
search.endTime = "";
|
||||||
if (null != dateRange && '' != dateRange) {
|
if (null != dateRange && '' != dateRange) {
|
||||||
|
|
@ -66,7 +80,7 @@ export function addDateRange(params, dateRange) {
|
||||||
}
|
}
|
||||||
// 添加搜索创建时间日期范围
|
// 添加搜索创建时间日期范围
|
||||||
export function addCreateDateRange(params, dateRange) {
|
export function addCreateDateRange(params, dateRange) {
|
||||||
var search = params;
|
let search = params;
|
||||||
let data = {
|
let data = {
|
||||||
beginCreateTime : "",
|
beginCreateTime : "",
|
||||||
endCreateTime : "",
|
endCreateTime : "",
|
||||||
|
|
@ -81,9 +95,9 @@ export function addCreateDateRange(params, dateRange) {
|
||||||
|
|
||||||
// 回显数据字典
|
// 回显数据字典
|
||||||
export function selectDictLabel(datas, value) {
|
export function selectDictLabel(datas, value) {
|
||||||
var actions = [];
|
let actions = [];
|
||||||
Object.keys(datas).some((key) => {
|
Object.keys(datas).some((key) => {
|
||||||
if (datas[key].dictValue == ('' + value)) {
|
if (datas[key].dictValue === ('' + value)) {
|
||||||
actions.push(datas[key].dictLabel);
|
actions.push(datas[key].dictLabel);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -93,12 +107,12 @@ export function selectDictLabel(datas, value) {
|
||||||
|
|
||||||
// 回显数据字典(字符串数组)
|
// 回显数据字典(字符串数组)
|
||||||
export function selectDictLabels(datas, value, separator) {
|
export function selectDictLabels(datas, value, separator) {
|
||||||
var actions = [];
|
let actions = [];
|
||||||
var currentSeparator = undefined === separator ? "," : separator;
|
let currentSeparator = undefined === separator ? "," : separator;
|
||||||
var temp = value.split(currentSeparator);
|
let temp = value.split(currentSeparator);
|
||||||
Object.keys(value.split(currentSeparator)).some((val) => {
|
Object.keys(value.split(currentSeparator)).some((val) => {
|
||||||
Object.keys(datas).some((key) => {
|
Object.keys(datas).some((key) => {
|
||||||
if (datas[key].dictValue == ('' + temp[val])) {
|
if (datas[key].dictValue === ('' + temp[val])) {
|
||||||
actions.push(datas[key].dictLabel + currentSeparator);
|
actions.push(datas[key].dictLabel + currentSeparator);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -113,9 +127,9 @@ export function download(fileName) {
|
||||||
|
|
||||||
// 字符串格式化(%s )
|
// 字符串格式化(%s )
|
||||||
export function sprintf(str) {
|
export function sprintf(str) {
|
||||||
var args = arguments, flag = true, i = 1;
|
let args = arguments, flag = true, i = 1;
|
||||||
str = str.replace(/%s/g, function () {
|
str = str.replace(/%s/g, function () {
|
||||||
var arg = args[i++];
|
let arg = args[i++];
|
||||||
if (typeof arg === 'undefined') {
|
if (typeof arg === 'undefined') {
|
||||||
flag = false;
|
flag = false;
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
import { parseTime } from './hcy'
|
import { parseTime } from './ebts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格时间格式化
|
* 表格时间格式化
|
||||||
*/
|
*/
|
||||||
export function formatDate(cellValue) {
|
export function formatDate(cellValue) {
|
||||||
if (cellValue == null || cellValue == "") return "";
|
if (cellValue == null || cellValue == "") return "";
|
||||||
var date = new Date(cellValue)
|
let date = new Date(cellValue)
|
||||||
var year = date.getFullYear()
|
let year = date.getFullYear()
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||||
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
let hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||||
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
let minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
let seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ export function getQueryObject(url) {
|
||||||
export function byteLength(str) {
|
export function byteLength(str) {
|
||||||
// returns the byte length of an utf8 string
|
// returns the byte length of an utf8 string
|
||||||
let s = str.length
|
let s = str.length
|
||||||
for (var i = str.length - 1; i >= 0; i--) {
|
for (let i = str.length - 1; i >= 0; i--) {
|
||||||
const code = str.charCodeAt(i)
|
const code = str.charCodeAt(i)
|
||||||
if (code > 0x7f && code <= 0x7ff) s++
|
if (code > 0x7f && code <= 0x7ff) s++
|
||||||
else if (code > 0x7ff && code <= 0xffff) s += 2
|
else if (code > 0x7ff && code <= 0xffff) s += 2
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,23 @@
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="realDate.data">
|
<el-table :data="realDate.data">
|
||||||
<el-table-column v-for="(item,index) in realDate.header"
|
<span v-for="(item,index) in realDate.header">
|
||||||
:label="item.label"
|
<el-table-column v-if="checkDateType(item.prop)"
|
||||||
align="center"
|
:label="item.label"
|
||||||
:key="index"
|
align="center"
|
||||||
:prop="item.prop"
|
:key="index"
|
||||||
/>
|
:prop="item.prop">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseDateOrTime(scope.row[item.prop]) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-else
|
||||||
|
:label="item.label"
|
||||||
|
align="center"
|
||||||
|
:key="index"
|
||||||
|
:prop="item.prop"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
|
|
@ -79,6 +90,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {realInfo, realData, exportReal} from "@/api/system/data"
|
import {realInfo, realData, exportReal} from "@/api/system/data"
|
||||||
|
import {parseTime} from "@/utils/ebts";
|
||||||
|
|
||||||
function listInit(list) {
|
function listInit(list) {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@
|
||||||
:value="dict.dictType">
|
:value="dict.dictType">
|
||||||
<span style="float: left">{{ dict.dictName }}</span>
|
<span style="float: left">{{ dict.dictName }}</span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -137,7 +137,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getGenTable, updateGenTable } from "@/api/tool/gen";
|
import { getGenTable, updateGenTable } from "@/api/tool/gen";
|
||||||
import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
|
import { optionSelect as getDictOptionselect } from "@/api/system/dict/type";
|
||||||
import { listMenu as getMenuTreeselect } from "@/api/system/menu";
|
import { listMenu as getMenuTreeselect } from "@/api/system/menu";
|
||||||
import basicInfoForm from "./basicInfoForm";
|
import basicInfoForm from "./basicInfoForm";
|
||||||
import genInfoForm from "./genInfoForm";
|
import genInfoForm from "./genInfoForm";
|
||||||
|
|
|
||||||
|
|
@ -130,12 +130,23 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="el-table">
|
<div class="el-table">
|
||||||
<el-table v-show="previewDate.open" :data="previewDate.data">
|
<el-table v-show="previewDate.open" :data="previewDate.data">
|
||||||
<el-table-column v-for="(item,index) in previewDate.header"
|
<span v-for="(item,index) in previewDate.header">
|
||||||
:label="item.label"
|
<el-table-column v-if="checkDateType(item.prop)"
|
||||||
align="center"
|
:label="item.label"
|
||||||
:key="index"
|
align="center"
|
||||||
:prop="item.prop"
|
:key="index"
|
||||||
/>
|
:prop="item.prop">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseDateOrTime(scope.row[item.prop]) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-else
|
||||||
|
:label="item.label"
|
||||||
|
align="center"
|
||||||
|
:key="index"
|
||||||
|
:prop="item.prop"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
|
|
@ -161,6 +172,20 @@
|
||||||
<el-input v-model="scope.row.label"></el-input>
|
<el-input v-model="scope.row.label"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="字典类型" min-width="10%">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dictTypeList"
|
||||||
|
:key="dict.dictType"
|
||||||
|
:label="dict.dictName"
|
||||||
|
:value="dict.dictType">
|
||||||
|
<span style="float: left">{{ dict.dictName }}</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" min-width="5%">
|
<el-table-column label="操作" align="center" min-width="5%">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -203,6 +228,7 @@ import 'codemirror/addon/hint/show-hint.css'
|
||||||
import 'codemirror/addon/hint/show-hint.js'
|
import 'codemirror/addon/hint/show-hint.js'
|
||||||
import 'codemirror/addon/hint/sql-hint.js'
|
import 'codemirror/addon/hint/sql-hint.js'
|
||||||
import {getQueryInfo, editQueryInfo, previewQueryData, Release, exportMock} from '@/api/tool/query'
|
import {getQueryInfo, editQueryInfo, previewQueryData, Release, exportMock} from '@/api/tool/query'
|
||||||
|
import {optionSelect} from '@/api/system/dict/type'
|
||||||
import {Message} from 'element-ui'
|
import {Message} from 'element-ui'
|
||||||
|
|
||||||
function JSONString(list) {
|
function JSONString(list) {
|
||||||
|
|
@ -220,11 +246,11 @@ function JSONString(list) {
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
function JSONparse(list) {
|
function JSONParse(list) {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
if (list[i].type == 2) {
|
if (list[i].type === 2) {
|
||||||
list[i].ucMock = JSON.parse(list[i].ucMock)
|
list[i].ucMock = JSON.parse(list[i].ucMock)
|
||||||
} else if (list[i].type == 4) {
|
} else if (list[i].type === 4) {
|
||||||
let time = JSON.parse(list[i].ucMock)
|
let time = JSON.parse(list[i].ucMock)
|
||||||
list[i].ucMock = [time.startTime, time.endTime]
|
list[i].ucMock = [time.startTime, time.endTime]
|
||||||
}
|
}
|
||||||
|
|
@ -240,6 +266,7 @@ export default {
|
||||||
tableHeight: document.documentElement.scrollHeight - 245 + 'px',
|
tableHeight: document.documentElement.scrollHeight - 245 + 'px',
|
||||||
// 表列信息
|
// 表列信息
|
||||||
columns: [],
|
columns: [],
|
||||||
|
dictTypeList:[],
|
||||||
sqlConfig: {
|
sqlConfig: {
|
||||||
// 默认的语法类型
|
// 默认的语法类型
|
||||||
mode: 'sql',
|
mode: 'sql',
|
||||||
|
|
@ -297,9 +324,12 @@ export default {
|
||||||
this.columns = []
|
this.columns = []
|
||||||
this.info = data.info
|
this.info = data.info
|
||||||
this.columnInfo.list = data.infoList
|
this.columnInfo.list = data.infoList
|
||||||
this.columns = JSONparse(data.list)
|
this.columns = JSONParse(data.list)
|
||||||
this.sqlConfig.coder.setValue(this.info.uqSql)
|
this.sqlConfig.coder.setValue(this.info.uqSql)
|
||||||
})
|
})
|
||||||
|
optionSelect().then(res =>{
|
||||||
|
this.dictTypeList = res.data
|
||||||
|
})
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initialize()
|
this.initialize()
|
||||||
})
|
})
|
||||||
|
|
@ -351,7 +381,8 @@ export default {
|
||||||
this.previewDate.header.forEach(item => {
|
this.previewDate.header.forEach(item => {
|
||||||
columnList.push({
|
columnList.push({
|
||||||
prop: item.key,
|
prop: item.key,
|
||||||
label: item.label
|
label: item.label,
|
||||||
|
dictType:null
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.columnInfo.list = columnList
|
this.columnInfo.list = columnList
|
||||||
|
|
@ -387,7 +418,8 @@ export default {
|
||||||
column = column.replace(/\s+/g, '')
|
column = column.replace(/\s+/g, '')
|
||||||
let columnItem = {
|
let columnItem = {
|
||||||
prop: column,
|
prop: column,
|
||||||
label: column
|
label: column,
|
||||||
|
dictType: null
|
||||||
}
|
}
|
||||||
columnList.push(columnItem)
|
columnList.push(columnItem)
|
||||||
}
|
}
|
||||||
|
|
@ -469,7 +501,8 @@ export default {
|
||||||
this.previewDate.header.push({
|
this.previewDate.header.push({
|
||||||
key: item.prop,
|
key: item.prop,
|
||||||
label: item.label,
|
label: item.label,
|
||||||
prop: item.prop
|
prop: item.prop,
|
||||||
|
dictType: item.dictType
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -477,12 +510,13 @@ export default {
|
||||||
this.previewDate.header.push({
|
this.previewDate.header.push({
|
||||||
key: key,
|
key: key,
|
||||||
label: key,
|
label: key,
|
||||||
prop: key
|
prop: key,
|
||||||
|
dictType:null
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.previewDate.open = true
|
this.previewDate.open = true
|
||||||
this.columns = JSONparse(list)
|
this.columns = JSONParse(list)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -560,7 +594,7 @@ export default {
|
||||||
}
|
}
|
||||||
data.infoList = this.columnInfo.list
|
data.infoList = this.columnInfo.list
|
||||||
editQueryInfo(data).then(res => {
|
editQueryInfo(data).then(res => {
|
||||||
this.columns = JSONparse(list)
|
this.columns = JSONParse(list)
|
||||||
Message({
|
Message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|
@ -592,7 +626,7 @@ export default {
|
||||||
}
|
}
|
||||||
return exportMock(data)
|
return exportMock(data)
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
that.columns = JSONparse(list)
|
that.columns = JSONParse(list)
|
||||||
this.download(response.msg)
|
this.download(response.msg)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
<script src="../../../api/tool/table.js"></script>
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
|
@ -272,12 +271,12 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listTable,columns, getTable, delTable, addTable, updateTable, exportTable, listInfoTable } from "@/api/tool/table";
|
import { listTable,columns, getTable, delTable, addTable, updateTable, exportTable, listInfoTable } from "@/api/tool/table";
|
||||||
import {listRole} from '../../../api/system/role'
|
import {listRole} from '@/api/system/role'
|
||||||
import importTopTable from "./importTopTable";
|
import importTopTable from "./importTopTable";
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: "Table",
|
name: "Table",
|
||||||
components: { importTopTable },
|
components: { importTopTable },
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -80,12 +80,23 @@
|
||||||
<right-toolbar :showSearch.sync="previewDate.showSearch" @queryTable="handleQuery"></right-toolbar>
|
<right-toolbar :showSearch.sync="previewDate.showSearch" @queryTable="handleQuery"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="previewDate.data">
|
<el-table :data="previewDate.data">
|
||||||
<el-table-column v-for="(item,index) in previewDate.header"
|
<span v-for="(item,index) in previewDate.header">
|
||||||
:label="item.label"
|
<el-table-column v-if="checkDateType(item.prop)"
|
||||||
align="center"
|
:label="item.label"
|
||||||
:key="index"
|
align="center"
|
||||||
:prop="item.prop"
|
:key="index"
|
||||||
/>
|
:prop="item.prop">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseDateOrTime(scope.row[item.prop]) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-else
|
||||||
|
:label="item.label"
|
||||||
|
align="center"
|
||||||
|
:key="index"
|
||||||
|
:prop="item.prop"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="previewDate.total>0"
|
v-show="previewDate.total>0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue