|
@@ -10,38 +10,53 @@
|
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
|
<ele-toolbar class="ele-toolbar-actions">
|
|
<ele-toolbar class="ele-toolbar-actions">
|
|
|
<div style="margin: 5px 0">
|
|
<div style="margin: 5px 0">
|
|
|
- <el-button
|
|
|
|
|
- size="small"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- class="ele-btn-icon"
|
|
|
|
|
- @click="openEdit(true)"
|
|
|
|
|
- v-if="$hasPermission('main:categorylevel:save')"
|
|
|
|
|
- >
|
|
|
|
|
- 新建下级节点
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="small"
|
|
|
|
|
- type="warning"
|
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
|
- class="ele-btn-icon"
|
|
|
|
|
- :disabled="!current.id || current.id == rootId"
|
|
|
|
|
- @click="openEdit(false)"
|
|
|
|
|
- v-if="$hasPermission('main:categorylevel:update')"
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ @click="openEdit(true)"
|
|
|
|
|
+ v-if="$hasPermission('main:categorylevel:save')"
|
|
|
|
|
+ >
|
|
|
|
|
+ 新建下级节点
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ :disabled="!current.id || current.id == rootId"
|
|
|
|
|
+ @click="openEdit(false)"
|
|
|
|
|
+ v-if="$hasPermission('main:categorylevel:update')"
|
|
|
|
|
+ >
|
|
|
|
|
+ 编辑节点
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ :disabled="!current.id || current.id == rootId"
|
|
|
|
|
+ @click="deleteCategory"
|
|
|
|
|
+ v-if="$hasPermission('main:categorylevel:delete')"
|
|
|
|
|
+ >
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </el-button></div
|
|
|
>
|
|
>
|
|
|
- 编辑节点
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="small"
|
|
|
|
|
- type="danger"
|
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- class="ele-btn-icon"
|
|
|
|
|
- :disabled="!current.id || current.id == rootId"
|
|
|
|
|
- @click="deleteCategory"
|
|
|
|
|
- v-if="$hasPermission('main:categorylevel:delete')"
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ @click="importProfession"
|
|
|
|
|
+ style="margin-top: 5px"
|
|
|
|
|
+ v-if="$hasPermission('main:categorylevel:update')"
|
|
|
|
|
+ >
|
|
|
|
|
+ 导入
|
|
|
|
|
+ </el-button></div
|
|
|
>
|
|
>
|
|
|
- 删除
|
|
|
|
|
- </el-button>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</ele-toolbar>
|
|
</ele-toolbar>
|
|
|
<div class="ele-border-lighter sys-organization-list">
|
|
<div class="ele-border-lighter sys-organization-list">
|
|
@@ -169,7 +184,16 @@
|
|
|
:rootId="rootId"
|
|
:rootId="rootId"
|
|
|
:curNode="curNode"
|
|
:curNode="curNode"
|
|
|
/>
|
|
/>
|
|
|
- <!-- <classify-manage-edit ref="editRef" @done="reload" /> -->
|
|
|
|
|
|
|
+ <importDialog
|
|
|
|
|
+ ref="importDialogRef"
|
|
|
|
|
+ :apiUrl="'/main/factoryworkstation/importBatch'"
|
|
|
|
|
+ :fileUrl="'/main/factoryworkstation/downLoadTemplate'"
|
|
|
|
|
+ fileName="分类导入模板"
|
|
|
|
|
+ @success="reload"
|
|
|
|
|
+ :param="{
|
|
|
|
|
+ id: current.id
|
|
|
|
|
+ }"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -182,11 +206,13 @@
|
|
|
deleteCategory
|
|
deleteCategory
|
|
|
} from '@/api/classifyManage';
|
|
} from '@/api/classifyManage';
|
|
|
import { parameterGetByCode } from '@/api/system/dictionary/index.js';
|
|
import { parameterGetByCode } from '@/api/system/dictionary/index.js';
|
|
|
|
|
+ import importDialog from '@/components/upload/import-dialogNew.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
classifyManageEdit,
|
|
classifyManageEdit,
|
|
|
- ListEdit
|
|
|
|
|
|
|
+ ListEdit,
|
|
|
|
|
+ importDialog
|
|
|
},
|
|
},
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
|
data() {
|
|
data() {
|
|
@@ -246,6 +272,9 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ importProfession() {
|
|
|
|
|
+ this.$refs.importDialogRef.open();
|
|
|
|
|
+ },
|
|
|
async reload(isEdit) {
|
|
async reload(isEdit) {
|
|
|
if (isEdit) {
|
|
if (isEdit) {
|
|
|
this.getTree().then(() => {
|
|
this.getTree().then(() => {
|