|
@@ -106,14 +106,17 @@ import {
|
|
|
adminDeptDel,
|
|
|
adminDeptAddWebsit,
|
|
|
adminDeptUpdateWebsit,
|
|
|
- adminDeptDelWebsit
|
|
|
+ adminDeptDelWebsit,
|
|
|
+ adminDeptImport
|
|
|
} from '@/api/departmentManagement.js'
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
+import { commonTemplateDownload } from '@/api/common.js'
|
|
|
+import import_mixin from '@/components/template/import_mixin.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
TemplatePage
|
|
|
},
|
|
|
- mixins: [operation_mixin],
|
|
|
+ mixins: [operation_mixin, import_mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
// 表格属性
|
|
@@ -155,6 +158,32 @@ export default {
|
|
|
optionsEvensGroup() {
|
|
|
return [
|
|
|
[
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth('import', ({ moduleName }) => {
|
|
|
+ return {
|
|
|
+ name: moduleName,
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(adminDeptImport, moduleName)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth('download', {
|
|
|
+ click: () => {
|
|
|
+ commonTemplateDownload({ name: '部门网点导入.xlsx' }, `${this.$route.meta.title}`)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ],
|
|
|
this?.keyixuan?.length
|
|
|
? [
|
|
|
this.optionsEvensAuth('add', {
|