Commit fa65a001 authored by xulili's avatar xulili

修改组织机构

parent c9174ccb
......@@ -4,7 +4,7 @@
custom-class="party-dialog"
title="新建机构"
:visible.sync="dialogVisible"
width="468px"
width="550px"
:before-close="handleClose"
>
<div class="dialog-content">
......@@ -17,8 +17,11 @@
class="party-form"
>
<el-form-item label="父级节点:">
<el-input v-model="form.parentName"></el-input>
<el-input v-model="form.parentName" readonly></el-input>
<div style="float:right">
<el-button @click="handlefocus" round>修改</el-button>
<el-button @click="form.parentName = ''" round>重置</el-button>
</div>
</el-form-item>
<el-form-item label="机构名称:" prop="name">
<el-input
......@@ -62,7 +65,7 @@
</template>
<script>
import { getAreas } from "@/config/area";
import orgTrees from './orgTree'
import orgTrees from "./orgTree";
export default {
data() {
return {
......
......@@ -4,7 +4,7 @@
custom-class="party-dialog"
title="编辑机构"
:visible.sync="dialogVisible"
width="468px"
width="550px"
:before-close="handleClose"
>
<div class="dialog-content">
......@@ -17,8 +17,12 @@
class="party-form"
>
<el-form-item label="父级节点:">
<el-input v-model="form.parentName"></el-input>
<el-input v-model="form.parentName" readonly></el-input>
<div style="float: right">
<el-button @click="handlefocus" round>修改</el-button>
<el-button @click="form.parentName = ''" round>重置</el-button>
</div>
<!-- <el-button @click="handlefocus" round>修改</el-button> -->
</el-form-item>
<el-form-item label="机构名称:" prop="name">
<el-input
......
......@@ -5,7 +5,10 @@
<div class="org-tree-box-header">组织结构</div>
<div class="org-tree-box-content">
<div class="tree-search party-form">
<el-input placeholder="请输入组织结构名称" v-model="name">
<el-input
placeholder="请输入组织结构名称"
v-model="name"
>
<i
slot="suffix"
class="el-input__icon el-icon-search"
......@@ -28,6 +31,12 @@
<i class="icon-import party-icon-20" />
</el-upload>
</el-tooltip>
<el-tooltip content="下载导入模版" placement="top">
<i
class="icon-down el-icon-download party-icon-20"
@click="downLoad"
/>
</el-tooltip>
</div>
</div>
<div class="tree-content">
......@@ -105,6 +114,7 @@
</template>
<script>
import { orgAdd, orgEdit } from "./orgDialog";
import axios from 'axios'
export default {
data() {
return {
......@@ -197,6 +207,21 @@ export default {
handleEdit() {
this.$refs.orgEdit.dialogVisible = true;
},
downLoad() {
axios
.get("static/file/机构导入模板.xlsx", {
responseType: "blob", //重要
})
.then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement("a");
let fname = "机构导入模板.xlsx";
link.href = url;
link.setAttribute("download", fname);
document.body.appendChild(link);
link.click();
});
},
// 删除
handleDel() {
let _this = this;
......@@ -293,6 +318,15 @@ export default {
<style lang="less" scoped>
.oran-wrapper {
display: flex;
.icon-down {
text-align: center;
font-size: 16px;
background-color: #ad9374;
color: #fff;
border-radius: 50%;
margin-left: 10px;
cursor: pointer;
}
.org-tree-container {
width: 420px;
padding-right: 20px;
......@@ -325,6 +359,9 @@ export default {
.icon-import {
margin-left: 10px;
}
.el-input{
width: 250px;
}
}
.org-tree-box-content {
padding: 20px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment