vue-ant-patterns
Version:
vue-ant-patterns
1,008 lines (934 loc) • 32.4 kB
JavaScript
import _mergeJSXProps from 'babel-helper-vue-jsx-merge-props';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _regeneratorRuntime from 'babel-runtime/regenerator';
import _asyncToGenerator from 'babel-runtime/helpers/asyncToGenerator';
import _typeof from 'babel-runtime/helpers/typeof';
import _extends from 'babel-runtime/helpers/extends';
/*
* @Author: liuyanxin
* @Date: 2020-05-20 14:41:47
* @LastEditTime: 2021-05-19 09:36:50
* @LastEditors: w.pengfei
* @Description:列表页面配置生成表格
* @FilePath: \vue-patterns\biz\b-temp-table\index.jsx
*/
// import T from 'ant-design-vue/es/table/Table';
import T from '../../es/d-auto-table';
import BTableBottomTools from '../../es/d-table-bottom-tools';
import request from '../_biz-utils/request';
// import PaginationBox from '../../es/d-pagination-box';
var API_PLATFORM = (global || window).globalJSConfig.SERVICE_CONFIG.API_PLATFORM;
var configUrl = API_PLATFORM + 'listPageExecuteController/getListPageConfig';
var tableDataUrl = API_PLATFORM + 'listPageExecuteController/executeSearchPaging';
var exportUrl = API_PLATFORM + 'queryResultExportController/exportExcelMethod';
var stateUrl = API_PLATFORM + 'computeController/getTask';
var getFileBolbUrl = API_PLATFORM + 'blobController/getBlobAjax';
var TempTable = {
name: 'BTempTable',
props: _extends({}, T.props, {
// 列表配置code
tempCode: {
type: String,
'default': ''
},
condition: {
type: Array,
'default': function _default() {
return [];
}
},
defcondition: {
type: Object,
'default': null
},
defOperators: {
type: Array,
'default': function _default() {
return [];
}
},
rowKey: {
type: [String, Function],
'default': 'key'
},
rowTitle: {
type: String
},
pageNum: {
type: Number,
'default': 1
},
pageSize: {
type: Number,
'default': 10
},
showSizeChanger: {
type: Boolean,
'default': true
},
size: {
type: String,
'default': 'small'
},
rowSelection: {
type: Object,
'default': null
},
showPagination: {
type: String | Boolean,
'default': 'auto'
},
hidenAlert: {
type: Boolean,
'default': false
},
customServe: {
type: String,
'default': ''
},
queryOptions: {
type: Array,
'default': function _default() {
return [];
}
},
actionColumn: {
type: String | Object,
'default': null
},
showExport: {
type: Boolean,
'default': true
},
sortColList: {
type: Array,
'default': function _default() {
return [];
}
},
defaultQuery: {
type: Object,
'default': null
},
autoLoad: {
type: Boolean,
'default': true
},
columnOptions: {
type: Object,
'default': null
},
otherColumns: {
type: Array,
'default': function _default() {
return [];
}
}
}),
watch: {
rowSelection: {
// 深度监听,可监听到对象、数组的变化
handler: function handler(val, oldVal) {
// this.selectedAllRowKeys = val.selectedAllRowKeys;
},
deep: true // true 深度监听
},
defcondition: {
handler: function handler(val, odlVal) {
this.refresh(true);
},
deep: true
}
},
data: function data() {
return {
selectedRows: [],
selectedRowKeys: [],
selectedAllRows: [],
selectedAllRowKeys: [],
localLoading: false,
localDataSource: [],
localPagination: _extends({}, this.pagination),
configData: {},
tableData: null,
showTages: false,
tableprops: null,
querypanelvisible: false,
otherCondition: {},
querypanelConditionList: [],
export_arguments: null,
showExportModal: false,
exportStateObj: null,
defaultConditionValue: null,
transferModalVisible: false,
isDefQuery: true
};
},
created: function created() {
var localPageNum = this.pageNum;
this.localPagination = ['auto', true].includes(this.showPagination) && _extends({}, this.localPagination, {
current: localPageNum,
pageSize: this.pageSize,
showSizeChanger: this.showSizeChanger
}) || false;
this.loadConfig();
// this.loadData();
},
methods: {
formatColumns: function formatColumns(cs, clist) {
var _this = this;
var s_colums = cs.map(function (_csitem) {
_csitem.dataIndex = _this.formatDataIndex(_csitem);
_csitem.key = _csitem.colName;
_csitem.title = _csitem.disName;
_csitem.scopedSlots = { customRender: _csitem.colName };
_csitem.slots = { title: 'custom-' + _csitem.colName };
var issorter = clist.find(function (_clistitem) {
return _clistitem.colName === _csitem.colName;
});
var inSortColList = _this.sortColList.indexOf(_csitem.colName) >= 0;
_csitem.sorter = issorter || inSortColList ? true : false;
return _csitem;
});
var aColums = this.formatActionColum(s_colums);
var oColums = this.formatOtherColums(aColums);
return this.formatColumOptions(oColums);
},
formatActionColum: function formatActionColum(colums) {
var actionColumn = this.actionColumn;
var res_c = [];
if (actionColumn !== null && (typeof actionColumn === 'undefined' ? 'undefined' : _typeof(actionColumn)) === 'object') {
res_c.push({
dataIndex: actionColumn.action,
key: actionColumn.action,
title: actionColumn.title,
scopedSlots: { customRender: actionColumn.action },
slots: { title: 'custom-' + actionColumn.action }
});
} else if (typeof actionColumn === 'string') {
res_c.push({
dataIndex: actionColumn,
key: actionColumn,
title: '操作',
scopedSlots: { customRender: actionColumn },
slots: { title: 'custom-' + actionColumn }
});
}
return res_c.concat(colums);
},
formatOtherColums: function formatOtherColums(aColums) {
var oColums = aColums.concat(this.otherColumns);
return oColums;
},
formatColumOptions: function formatColumOptions(colums) {
var _this2 = this;
return colums.map(function (_csitem) {
if (_this2.columnOptions) {
if (_this2.columnOptions[_csitem.dataIndex]) {
_csitem = _extends({}, _csitem, _this2.columnOptions[_csitem.dataIndex]);
}
}
return _csitem;
});
},
formatDataIndex: function formatDataIndex(item) {
var dataType = item.dataType,
colName = item.colName;
var dataIndex = '';
switch (dataType) {
case 'Code':
dataIndex = colName + '.name';
break;
case 'Date':
dataIndex = colName + '.value';
break;
default:
dataIndex = colName;
break;
}
return dataIndex;
},
formatProps: function formatProps() {
var _this3 = this;
var props = {};
var localKeys = Object.keys(this.$data);
Object.keys(T.props).forEach(function (k) {
var localKey = 'local' + k.substring(0, 1).toUpperCase() + k.substring(1);
if (localKeys.includes(localKey)) {
props[k] = _this3[localKey];
return props[k];
}
if (k === 'rowSelection') {
if (_this3.rowSelection) {
// 如果需要使用alert,则重新绑定 rowSelection 事件
props[k] = _extends({}, _this3.rowSelection, {
selectedRows: _this3.selectedRows,
selectedRowKeys: _this3[k].selectedAllRowKeys,
onChange: function onChange(selectedRowKeys, selectedRows) {
_this3.updateSelect(selectedRowKeys, selectedRows);
typeof _this3[k].onChange !== 'undefined' && _this3[k].onChange(selectedRowKeys, selectedRows);
},
onSelect: function onSelect(record, selected, selectedRows) {
_this3.operationSelect(selected, [record]);
typeof _this3[k].onSelect !== 'undefined' && _this3[k].onSelect(record, selected, selectedRows);
},
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
_this3.operationSelect(selected, changeRows);
typeof _this3[k].onSelectAll !== 'undefined' && _this3[k].onSelectAll(selected, selectedRows, changeRows);
}
});
return props[k];
} else if (!_this3.rowSelection) {
// 如果没打算开启 rowSelection
props[k] = null;
return props[k];
}
}
_this3[k] && (props[k] = _this3[k]);
return props[k];
});
return props;
},
/**
* 表格重新加载方法
* 如果参数为 true, 则强制刷新到第一页
* @param Boolean bool
*/
refresh: function refresh() {
var bool = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
bool && (this.localPagination = _extends({}, {
current: 1,
pageSize: this.pageSize
}));
this.loadData();
},
/**
* 加载表格配置
* @param Boolean bool
*/
loadConfig: function () {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
var qryConfigData, res;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
qryConfigData = {
url: configUrl,
method: 'post',
data: {
code: this.tempCode
}
};
_context.next = 3;
return request(qryConfigData);
case 3:
res = _context.sent;
this.configData = res.data.data; // res.resultData;
case 5:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
function loadConfig() {
return _ref.apply(this, arguments);
}
return loadConfig;
}(),
/**
* 加载数据方法
* @param {Object} pagination 分页选项器
* @param {Object} filters 过滤条件
* @param {Object} sorter 排序条件
*/
loadData: function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(pagination, filters, sorter) {
var sortList, columnKey, order, style, sortdata, condition, qryData, qryTableParam, result;
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
this.localLoading = true;
sortList = [];
if (sorter && Object.keys(sorter).length !== 0 && sorter.order) {
columnKey = sorter.columnKey, order = sorter.order;
style = order === 'ascend' ? 'ASC' : 'DESC';
sortdata = {
style: style,
field: columnKey
};
sortList = [sortdata];
}
condition = _extends({
autoCount: true
}, {
pageNumber: pagination && pagination.current || this.showPagination && this.localPagination.current || this.pageNum,
pageSize: pagination && pagination.pageSize || this.showPagination && this.localPagination.pageSize || this.pageSize
}, {
conditionList: this.querypanelConditionList
}, {
sortList: sortList
});
this.formatOtherCondition();
qryData = {
code: this.tempCode,
condition: condition,
otherCondition: this.otherCondition
};
qryTableParam = {
url: this.customServe ? '' + this.customServe : tableDataUrl,
// headers: {
// Authorization:
/* eslint-disable-next-line */
// 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlSWQiOltdLCJpc3MiOiJnYXRld2F5IiwibmFtZSI6IlRCIiwiZXhwIjoxNjAwMzA2NzcwLCJpYXQiOjE2MDAyMjAzNzAsImp0aSI6ImE1M2UzYjc3LTIwYTEtNDJiMC1iYTc2LWJhMWU2ZjY5NThlNiIsImFjY291bnQiOiJUQiJ9.BMYtNoaT0-cya39b4cc-2FgBehjOCigNr3kg0E9J0Do',
// userId: '6fe038514ee1493081ccd7a202254c1a',
// },
method: 'post',
data: qryData
};
this.export_arguments = qryData;
_context2.next = 10;
return request(qryTableParam);
case 10:
result = _context2.sent;
this.tableData = result.data.data;
this.resetBlurQuery();
if (!(((typeof result === 'undefined' ? 'undefined' : _typeof(result)) === 'object' || typeof result === 'function') && result.data.code === 200)) {
_context2.next = 23;
break;
}
this.localPagination = this.showPagination && _extends({}, this.localPagination, {
current: this.tableData.pageNum, // 返回结果中的当前分页数
total: this.tableData.totalSize, // 返回结果中的总记录数
showSizeChanger: this.showSizeChanger,
pageSize: pagination && pagination.pageSize || this.localPagination.pageSize,
showTotal: function showTotal(total) {
return '\u5171 ' + total + ' \u6761\u8BB0\u5F55';
}
}) || false;
// 为防止删除数据后导致页面当前页面数据长度为 0 ,自动翻页到上一页
if (!(this.tableData.dataList.length === 0 && this.showPagination && this.localPagination.current > 1)) {
_context2.next = 19;
break;
}
this.localPagination.current--;
this.loadData();
return _context2.abrupt('return');
case 19:
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
try {
if (['auto', true].includes(this.showPagination) && result.totalSize <= result.pageNum * this.localPagination.pageSize) {
this.localPagination.hideOnSinglePage = true;
}
} catch (e) {
this.localPagination = false;
}
this.localDataSource = result.dataList; // 返回结果中的数组数据
_context2.next = 23;
break;
case 23:
this.localLoading = false;
case 24:
case 'end':
return _context2.stop();
}
}
}, _callee2, this);
}));
function loadData(_x2, _x3, _x4) {
return _ref2.apply(this, arguments);
}
return loadData;
}(),
/**
* @description: 整理 otherCondition
* @param {type}
* @return:
*/
formatOtherCondition: function formatOtherCondition() {
var obj = {};
this.configData.paramList && this.configData.paramList.forEach(function (_pitem) {
var name = _pitem.name,
strValue = _pitem.strValue;
obj = _extends(obj, _defineProperty({}, '' + name, strValue));
});
obj = _extends(obj, this.defcondition);
this.otherCondition = obj;
// this.defcondition,
},
formatDefOperators: function formatDefOperators() {
if (this.defOperators.length !== 0) this.$refs._bquerypanel.setOperators(this.defOperators);
},
/**
* 用于更新已选中的列表数据 total 统计
* @param selectedRowKeys
* @param selectedRows
*/
updateSelect: function updateSelect(selectedRowKeys, selectedRows) {
this.selectedRows = selectedRows;
this.selectedRowKeys = selectedRowKeys;
},
/**
* 清空 table 已选中项
*/
clearSelected: function clearSelected() {
if (this.rowSelection) {
this.operationSelect(false, this.selectedAllRows);
}
},
/**
*
*/
randerSelectItem: function randerSelectItem(sitem) {
var _this4 = this;
var h = this.$createElement;
return h(
'a-col',
{ 'class': 'margin-bottom-xs' },
[h(
'a-tag',
{
attrs: {
closable: true,
color: '#FBE9C5'
},
on: {
'close': function close(e) {
e.preventDefault();
_this4.operationSelect(false, [sitem]);
},
'click': function click(e) {
e.preventDefault();
_this4.operationSelect(false, [sitem]);
}
}
},
[sitem[this.rowTitle]]
)]
);
},
getRecordKey: function getRecordKey(record, index) {
var rowKey = this.$props.rowKey;
var recordKey = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey];
return recordKey === undefined ? index : recordKey;
},
/**
* 自定义选择操作
* @param {Boolean} selected
* @param {Array} changeRows
*/
operationSelect: function operationSelect(selected, changeRows) {
var _this5 = this;
if (selected) {
if (this.rowSelection.type === 'radio') {
this.selectedAllRows = changeRows;
} else {
this.selectedAllRows = this.selectedAllRows.concat(changeRows);
}
} else {
this.selectedAllRows = this.selectedAllRows.filter(function (_sitem, _sIndex) {
var changeRowsKey = changeRows.map(function (_citem, _cindex) {
return _this5.getRecordKey(_citem, _cindex);
});
return !changeRowsKey.includes(_this5.getRecordKey(_sitem, _sIndex));
});
}
this.selectedAllRowKeys = this.selectedAllRows.map(function (_item, _index) {
return _this5.getRecordKey(_item, _index);
});
this.selectedRowKeys = this.selectedAllRowKeys;
typeof this.rowSelection.onSelectTotle !== 'undefined' && this.rowSelection.onSelectTotle(this.selectedAllRowKeys, this.selectedAllRows, selected, changeRows);
},
doQuery: function doQuery(conditionList) {
if (this.isDefQuery) {
this.isDefQuery = false;
this.formatDefOperators();
this.$refs._bquerypanel.doQuery();
return false;
}
if (conditionList) {
this.defaultConditionValue = conditionList;
}
this.querypanelConditionList = conditionList || this.defaultConditionValue || [];
this.loadData();
},
'export': function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
var urlarr, newMethonName, newServiceName, newurl, displayColList, serviceName, methodName, columns, exportParam, result;
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
urlarr = void 0, newMethonName = void 0, newServiceName = void 0, newurl = void 0;
if (this.customServe) {
urlarr = this.customServe.split('/');
newMethonName = urlarr.splice(-1)[0];
newServiceName = urlarr.splice(-1)[0];
newurl = urlarr.join('/') + '/queryResultExportController/exportExcelMethod';
}
displayColList = this.configData.displayColList;
serviceName = this.customServe ? newServiceName : 'listPageExecuteController';
methodName = this.customServe ? newMethonName : 'executeSearchPaging';
columns = this.formatExportColumns(displayColList);
// const serviceType = this.customServe ? 'tb' : 'platform';
this.export_arguments.condition.pageSize = 999999;
exportParam = {
url: this.customServe ? newurl : exportUrl,
method: 'post',
data: {
// serviceType,
serviceName: serviceName,
methodName: methodName,
columns: columns,
arguments: this.export_arguments
}
};
_context3.next = 10;
return request(exportParam);
case 10:
result = _context3.sent;
if (result.data.code === 200) {
// this.getExportState(result.data.data);
this.export_downLoad(result.data.data);
}
case 12:
case 'end':
return _context3.stop();
}
}
}, _callee3, this);
}));
function _export() {
return _ref3.apply(this, arguments);
}
return _export;
}(),
export_downLoad: function export_downLoad(fileId) {
this.fileId = fileId;
request({
url: getFileBolbUrl,
data: {
fileId: fileId
},
responseType: 'blob'
}).then(function (res) {
var fileName = window.decodeURI(res.headers['content-disposition'].split('=')[1], 'UTF-8');
var data = res.request.response;
if (window.navigator.msSaveBlob) {
// IE以及IE内核的浏览器
try {
window.navigator.msSaveBlob(data, fileName);
} catch (e) {
console.log(e);
}
} else {
var url = window.URL.createObjectURL(data);
var link = document.createElement('a');
link.style.display = 'none';
link.href = url;
link.setAttribute('download', fileName); // 文件名
document.body.appendChild(link);
link.click();
document.body.removeChild(link); // 下载完成移除元素
window.URL.revokeObjectURL(url); // 释放掉blob对象
}
});
},
getExportState: function () {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(taskId) {
var _this6 = this;
var stateParam, result;
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
stateParam = {
url: stateUrl,
method: 'post',
data: {
taskId: taskId
}
};
_context4.next = 3;
return request(stateParam);
case 3:
result = _context4.sent;
if (true) {
this.showExportModal = true;
this.exportStateObj = result.data.data;
}
if (this.exportStateObj.status.code !== 'done' && this.exportStateObj.status.code !== 'exception') {
setTimeout(function () {
_this6.getExportState(taskId);
}, 1000);
}
case 6:
case 'end':
return _context4.stop();
}
}
}, _callee4, this);
}));
function getExportState(_x5) {
return _ref4.apply(this, arguments);
}
return getExportState;
}(),
formatExportColumns: function formatExportColumns(displayColList) {
return displayColList.map(function (_csitem) {
return {
label: _csitem.disName,
name: _csitem.colName,
dataType: _csitem.dataType
};
});
},
/**
* 模糊查询重置, 在表格数据变化后, 否则会出错
*/
resetBlurQuery: function resetBlurQuery() {
var blueQuery = this.$refs.blueQuery;
if (blueQuery) {
blueQuery.reset();
}
},
/**
* 打开设置显示项目
*/
setDisPlayItem: function setDisPlayItem() {
this.transferTargetKeys = this.transferModalVisible = true;
},
setOperators: function setOperators(_soitem) {
this.$refs._bquerypanel.setOperators(_soitem);
}
},
render: function render() {
var _this7 = this;
var h = arguments[0];
var _configData = this.configData,
displayColList = _configData.displayColList,
conditionColList = _configData.conditionColList;
var props = this.formatProps();
props.columns = displayColList ? this.formatColumns(displayColList, conditionColList) : props.columns;
props.dataSource = this.tableData ? this.tableData.dataList : [];
props.scroll = _extends({}, { y: true }, props.scroll);
var table = h(
T,
_mergeJSXProps([{ props: props, scopedSlots: _extends({}, this.$scopedSlots), ref: 'BTempTable' }, {
ref: 'tableInstance',
on: {
'change': this.loadData,
'expand': function expand(expanded, record) {
_this7.$emit('expand', expanded, record);
}
}
}]),
[Object.keys(this.$slots).map(function (name) {
return h(
'template',
{ slot: name },
[_this7.$slots[name]]
);
}), this.showExport && h(
'template',
{ slot: 'footer' },
[h(BTableBottomTools, [h(
'a-button',
{
attrs: { icon: 'file-excel' },
on: {
'click': this['export']
}
},
['\u5BFC\u51FA\u67E5\u8BE2\u7ED3\u679C']
)])]
)]
);
var modalprops = {
props: {
size: 'small',
destroyOnClose: false,
footer: null,
title: '导出',
maskClosable: false,
visible: this.showExportModal
},
on: {
cancel: function cancel() {
_this7.showExportModal = false;
}
}
};
var tableInstance = this.$refs.tableInstance;
var tableBlurProps = {
props: {
table: tableInstance,
size: 'small'
},
ref: 'blueQuery',
on: {
// 关闭快搜, 需要重置模糊查询
close: function close() {
_this7.resetBlurQuery();
},
clear: function clear() {
this.resetBlurQuery();
}
}
};
var dQuickSearchProps = {
props: {
size: 'small'
},
on: {
close: function close() {
_this7.resetBlurQuery();
}
}
};
var transferModalProps = {
props: {
size: 'small',
destroyOnClose: false,
footer: null,
title: '设置显示项目',
maskClosable: false,
visible: this.transferModalVisible
}
};
var transferProps = {
props: {
dataSource: 'mockData',
showSearch: 'true',
filterOption: 'filterOption',
targetKeys: 'targetKeys',
render: 'item=>item.title'
},
on: {
change: function change() {},
search: function search() {}
}
};
return h(
'd-container-v',
{
attrs: { grow: true, flex: true },
'class': 'depot-biz-temptable' },
[h('d-tools', [h(
'template',
{ slot: 'main' },
[this.$slots['left-operate']]
), h(
'template',
{ slot: 'second' },
[tableInstance ? h(
'd-quick-search',
dQuickSearchProps,
[h(
'template',
{ slot: 'customRender' },
[h('b-blur-query', tableBlurProps)]
)]
) : null, h(
'a-tooltip',
{
attrs: { placement: 'topRight', autoAdjustOverflow: true, title: '\u7B5B\u9009' }
},
[h(
'd-icon-button',
{
attrs: {
size: 'small'
},
on: {
'click': function click() {
_this7.querypanelvisible = !_this7.querypanelvisible;
}
}
},
[h('d-icon', {
attrs: { type: 'filter' }
})]
)]
), h(
'a-tooltip',
{
attrs: { placement: 'topRight', autoAdjustOverflow: true, title: '\u8BBE\u7F6E' }
},
[h(
'd-icon-button',
{
attrs: { size: 'small' }
},
[h('d-icon', {
attrs: { type: 'setting' }
})]
)]
)]
)]), this.configData && this.configData.conditionColList && h(
'b-query-panel',
{
ref: '_bquerypanel',
'class': 'margin-bottom-xs',
attrs: { visible: this.querypanelvisible,
autoLoad: this.autoLoad
},
on: {
'changeVisible': function changeVisible(e) {
_this7.querypanelvisible = e;
},
'doQuery': this.doQuery
}
},
[this.configData.conditionColList.map(function (_conitem) {
var customObj = _this7.queryOptions && _this7.queryOptions.length !== 0 && _this7.queryOptions.find(function (_qf) {
return _conitem.colName === _qf.code;
});
var comboOptions = customObj && customObj.comboOptions || [];
var typeCode = _conitem.controlCode;
var defaultValue = _this7.defaultQuery && _this7.defaultQuery[_conitem.colName];
var bqc_props = {
props: {
name: customObj && customObj.name || _conitem.disName,
code: _conitem.colName,
dataType: customObj && customObj.dataType || _conitem.dataType,
typeCode: typeCode,
comboOptions: comboOptions,
defaultValue: defaultValue
}
};
return h('b-query-condition', bqc_props);
}), this.queryOptions && this.queryOptions.map(function (_qoitem) {
if (_qoitem.code && _qoitem.name) {
var code = _qoitem.code,
name = _qoitem.name,
dataType = _qoitem.dataType,
typeCode = _qoitem.typeCode,
comboOptions = _qoitem.comboOptions,
defaultValue = _qoitem.defaultValue;
var bqc_props = {
props: { code: code, name: name, dataType: dataType, typeCode: typeCode, comboOptions: comboOptions || [], defaultValue: defaultValue }
};
return h('b-query-condition', bqc_props);
} else {
return '';
}
})]
), table, h(
'd-modal',
transferModalProps,
[h('a-transfer', transferProps)]
), h(
'd-modal',
modalprops,
[h('p', ['\u4EFB\u52A1\u540D\u79F0 ', this.exportStateObj && this.exportStateObj.name || '']), h('p', ['\u670D\u52A1\u5668ip ', this.exportStateObj && this.exportStateObj.ipAddr || '']), h('p', ['\u5F00\u59CB\u65F6\u95F4 ', this.exportStateObj && this.exportStateObj.start]), this.exportStateObj && this.exportStateObj.status.code === 'done' && h('p', ['\u7ED3\u675F\u65F6\u95F4\uFF1A', this.exportStateObj && this.exportStateObj.endTime]), h('p', ['\u72B6\u6001 ', this.exportStateObj && this.exportStateObj.status.name]), this.exportStateObj && this.exportStateObj.status.code === 'done' && h('p', ['\u4E0B\u8F7D'])]
)]
);
}
};
TempTable.install = function (Vue) {
Vue.component(TempTable.name, TempTable);
};
export default TempTable;