Merge branch 'v2.x' of gitee.com:liqianglog/django-vue-admin into origin-v2.x
commit
53513a1d06
|
@ -47,6 +47,8 @@ def import_to_data(file_url, field_data, m2m_fields=None):
|
||||||
cell_value = int(str(cell_value).split(".")[0])
|
cell_value = int(str(cell_value).split(".")[0])
|
||||||
if type(cell_value) is str:
|
if type(cell_value) is str:
|
||||||
cell_value = cell_value.strip(" \t\n\r")
|
cell_value = cell_value.strip(" \t\n\r")
|
||||||
|
if cell_value is None:
|
||||||
|
continue
|
||||||
if key in validation_data_dict:
|
if key in validation_data_dict:
|
||||||
array[key] = validation_data_dict.get(key, {}).get(cell_value, None)
|
array[key] = validation_data_dict.get(key, {}).get(cell_value, None)
|
||||||
if key in m2m_fields:
|
if key in m2m_fields:
|
||||||
|
|
|
@ -213,13 +213,14 @@ const refreshTken = function () {
|
||||||
* 下载文件
|
* 下载文件
|
||||||
* @param url
|
* @param url
|
||||||
* @param params
|
* @param params
|
||||||
|
* @param method
|
||||||
* @param filename
|
* @param filename
|
||||||
*/
|
*/
|
||||||
export const downloadFile = function ({ url, data, method, filename }) {
|
export const downloadFile = function ({ url, params, method, filename }) {
|
||||||
request({
|
request({
|
||||||
url: url,
|
url: url,
|
||||||
method: method,
|
method: method,
|
||||||
data: data,
|
params: params,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
// headers: {Accept: 'application/vnd.openxmlformats-officedocument'}
|
// headers: {Accept: 'application/vnd.openxmlformats-officedocument'}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
|
@ -166,12 +166,14 @@ export default {
|
||||||
return api.BatchDel(ids)
|
return api.BatchDel(ids)
|
||||||
},
|
},
|
||||||
onExport () {
|
onExport () {
|
||||||
|
const that = this
|
||||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return api.exportData()
|
const query = that.getSearch().getForm()
|
||||||
|
return api.exportData({ ...query })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 重置密码弹框
|
// 重置密码弹框
|
||||||
|
|
Loading…
Reference in New Issue