Commit fa65a001 authored by xulili's avatar xulili

修改组织机构

parent c9174ccb
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
custom-class="party-dialog" custom-class="party-dialog"
title="新建机构" title="新建机构"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="468px" width="550px"
:before-close="handleClose" :before-close="handleClose"
> >
<div class="dialog-content"> <div class="dialog-content">
...@@ -17,8 +17,11 @@ ...@@ -17,8 +17,11 @@
class="party-form" class="party-form"
> >
<el-form-item label="父级节点:"> <el-form-item label="父级节点:">
<el-input v-model="form.parentName"></el-input> <el-input v-model="form.parentName" readonly></el-input>
<el-button @click="handlefocus" round>修改</el-button> <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>
<el-form-item label="机构名称:" prop="name"> <el-form-item label="机构名称:" prop="name">
<el-input <el-input
...@@ -62,7 +65,7 @@ ...@@ -62,7 +65,7 @@
</template> </template>
<script> <script>
import { getAreas } from "@/config/area"; import { getAreas } from "@/config/area";
import orgTrees from './orgTree' import orgTrees from "./orgTree";
export default { export default {
data() { data() {
return { return {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
custom-class="party-dialog" custom-class="party-dialog"
title="编辑机构" title="编辑机构"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="468px" width="550px"
:before-close="handleClose" :before-close="handleClose"
> >
<div class="dialog-content"> <div class="dialog-content">
...@@ -17,8 +17,12 @@ ...@@ -17,8 +17,12 @@
class="party-form" class="party-form"
> >
<el-form-item label="父级节点:"> <el-form-item label="父级节点:">
<el-input v-model="form.parentName"></el-input> <el-input v-model="form.parentName" readonly></el-input>
<el-button @click="handlefocus" round>修改</el-button> <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>
<el-form-item label="机构名称:" prop="name"> <el-form-item label="机构名称:" prop="name">
<el-input <el-input
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
<div class="org-tree-box-header">组织结构</div> <div class="org-tree-box-header">组织结构</div>
<div class="org-tree-box-content"> <div class="org-tree-box-content">
<div class="tree-search party-form"> <div class="tree-search party-form">
<el-input placeholder="请输入组织结构名称" v-model="name"> <el-input
placeholder="请输入组织结构名称"
v-model="name"
>
<i <i
slot="suffix" slot="suffix"
class="el-input__icon el-icon-search" class="el-input__icon el-icon-search"
...@@ -28,6 +31,12 @@ ...@@ -28,6 +31,12 @@
<i class="icon-import party-icon-20" /> <i class="icon-import party-icon-20" />
</el-upload> </el-upload>
</el-tooltip> </el-tooltip>
<el-tooltip content="下载导入模版" placement="top">
<i
class="icon-down el-icon-download party-icon-20"
@click="downLoad"
/>
</el-tooltip>
</div> </div>
</div> </div>
<div class="tree-content"> <div class="tree-content">
...@@ -105,6 +114,7 @@ ...@@ -105,6 +114,7 @@
</template> </template>
<script> <script>
import { orgAdd, orgEdit } from "./orgDialog"; import { orgAdd, orgEdit } from "./orgDialog";
import axios from 'axios'
export default { export default {
data() { data() {
return { return {
...@@ -197,6 +207,21 @@ export default { ...@@ -197,6 +207,21 @@ export default {
handleEdit() { handleEdit() {
this.$refs.orgEdit.dialogVisible = true; 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() { handleDel() {
let _this = this; let _this = this;
...@@ -293,6 +318,15 @@ export default { ...@@ -293,6 +318,15 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.oran-wrapper { .oran-wrapper {
display: flex; 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 { .org-tree-container {
width: 420px; width: 420px;
padding-right: 20px; padding-right: 20px;
...@@ -325,6 +359,9 @@ export default { ...@@ -325,6 +359,9 @@ export default {
.icon-import { .icon-import {
margin-left: 10px; margin-left: 10px;
} }
.el-input{
width: 250px;
}
} }
.org-tree-box-content { .org-tree-box-content {
padding: 20px; 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