From ed6c6350015d52ea1cb033c7558f72b721ece84a Mon Sep 17 00:00:00 2001 From: WangHan <wwh_work@126,com> Date: 星期四, 19 十二月 2024 19:58:55 +0800 Subject: [PATCH] 打包名称修改,去除错误输出 --- admin-web/src/views/foundation/classification/index.vue | 60 ++++++++++++++++++++++++++++-------------------------------- 1 files changed, 28 insertions(+), 32 deletions(-) diff --git a/admin-web/src/views/foundation/classification/index.vue b/admin-web/src/views/foundation/classification/index.vue index 59bf55a..f6acf85 100644 --- a/admin-web/src/views/foundation/classification/index.vue +++ b/admin-web/src/views/foundation/classification/index.vue @@ -42,11 +42,10 @@ import items from './items'; import edit from './edit'; import * as finsystenant from '@/api/baseSetting/finsystenant'; -import { getTree } from '@/api/foudation/classification'; +import {getTree} from '@/api/foudation/classification'; import myImport from '@/views/components/myImport'; -import { getBaseUrl } from '@/utils/base'; -import { getType } from '@/api/system/dict/type'; -import { getDicts } from '@/api/system/dict/data'; +import {getBaseUrl} from '@/utils/base'; +import {getDicts} from '@/api/system/dict/data'; export default { name: 'index', @@ -70,15 +69,15 @@ dialogShow: false, fileSettings: { data: {}, - uploadUrl: getBaseUrl() + '/pc/fin/sys/tenant/import', // 涓婁紶鍦板潃 + uploadUrl: getBaseUrl() + '/pc/base/category/import', // 涓婁紶鍦板潃 accept: '.xls', // 鏍煎紡 type: 'text', // 鍥炴樉褰㈠紡 - loading: false, // 瀵煎叆鏁堟灉 + loading: true, // 瀵煎叆鏁堟灉 }, /* 妯℃澘涓嬭浇 */ templateSettings: { templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О - templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate', // 涓嬭浇鍦板潃 + templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate?type=classification', // 涓嬭浇鍦板潃 }, onSuccess: null, }, @@ -111,13 +110,19 @@ this.showAdd(null); }, }, + { + name: '瀵煎叆', + click: () => { + this.openImport(null); + }, + }, ], }, // 鍒椾俊鎭� columns: [ - { title: '鍒嗙被鍚嶇О', field: 'categoryName', align: 'center' }, - { title: '绫诲埆', field: 'classification', align: 'left' }, - { title: '鏄剧ず椤哄簭', field: 'orderNumber', align: 'center', width: '80px' }, + { title: '鍒嗙被鍚嶇О', field: 'categoryName', align: 'left', minWidth: 140 }, + { title: '绫诲埆', field: 'classification', align: 'center', width: 100 }, + { title: '鏄剧ず椤哄簭', field: 'orderNumber', align: 'center', width: 100 }, { field: 'states', title: '鐘舵��', @@ -150,7 +155,7 @@ // 鎿嶄綔淇℃伅 operation: { show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 + width: '160', // 鍒楀 attr: [ { title: '缂栬緫', @@ -208,14 +213,8 @@ // 宸︿晶鏍戝垵濮嬪寲 initTreeData() { getTree().then((res) => { - console.log(res, 'restree'); - console.log(this.importSetting, 'this.importSetting'); const content = res || []; - // this.treeDataList.splice(0, this.treeDataList.length) this.treeDataList = content; - // if (content.length > 0) { - // this.importSetting.fileSettings.data = {pid: content[0].id} - // } }); }, updState(row) { @@ -230,25 +229,20 @@ vm.$modal.msgSuccess(text + '鎴愬姛'); vm.search(); } - }); + }) }); }, del(row) { - this.$modal - .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.categoryName + '"鐨勬満鏋勫悧锛�') + var that = this + this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.categoryName + '"鐨勬満鏋勫悧锛�') .then(function () { - finsystenant.del({ id: row.id }).then((res) => {}); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search(); - }) - .catch(() => {}); + finsystenant.del({ id: row.id }).then((res) => { + that.$message.success('鍒犻櫎鎴愬姛锛�'); + that.refreshData(); + }) + }); }, showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { if (this.p && this.p) { this.editSetting.pid = this.p.id; } @@ -256,7 +250,6 @@ this.editSetting.info = null; this.editSetting.title = '鏂板'; this.editSetting.show = true; - // } }, showAudit(row) { this.editSetting.id = row.id; @@ -265,7 +258,6 @@ this.editSetting.show = true; }, nodeClick(param) { - console.log(param, 'param'); param = param || {}; this.p = Object.assign( {}, @@ -300,6 +292,10 @@ this.filterFrom = Object.assign(this.filterFrom, params); this.search(1); }, + + openImport(){ + this.importOrg(); + }, }, }; </script> -- Gitblit v1.9.1