<template>
|
<div class="custom-scroll">
|
<v-header
|
title="社会组织管理"
|
:bar="bar"
|
search
|
@on-search="onSearch"
|
></v-header>
|
<div class="add fl-al mr-b-10" v-if="userType !== 1">
|
<el-button size="small" type="primary" @click.stop="clickHandle('add')"
|
>新增</el-button
|
>
|
<el-button size="small" @click.stop="clickHandle('serve')"
|
>服务类型管理</el-button
|
>
|
<el-button size="small" @click.stop="clickHandle('add')">导入</el-button>
|
<el-button size="small" @click.stop="clickHandle('add')"
|
>下载模板</el-button
|
>
|
</div>
|
<div class="tab">
|
<v-tool-table :trs="trs" :tds="tds">
|
<template v-slot:companyType="item">
|
<span v-if="item.scope.companyType === 1">社会团体</span>
|
<span v-if="item.scope.companyType === 2">民办非企业单位</span>
|
<span v-if="item.scope.companyType === 3">基金会</span>
|
</template>
|
<template v-slot:buildType="item">
|
<span v-if="item.scope.buildType === 1">社区孵化</span>
|
<span v-if="item.scope.buildType === 2">民政注册</span>
|
</template>
|
<template v-slot:status="item">
|
<span v-if="item.scope.status === 1">启用</span>
|
<span v-if="item.scope.status === 0">停用</span>
|
</template>
|
<template v-slot:btn="{ scope }">
|
<el-button @click="clickHandle('edit', scope)" type="text"
|
>编辑</el-button
|
>
|
<el-button @click="clickHandle('details', scope)" type="text"
|
>查看</el-button
|
>
|
<el-button @click="clickHandle('delete', scope)" type="text"
|
>删除</el-button
|
>
|
</template>
|
</v-tool-table>
|
</div>
|
<v-tool-page :item="paged" @on-page="onPage"></v-tool-page>
|
<!-- 查看详情 -->
|
<el-dialog
|
title="组织基础信息"
|
:visible.sync="dialogVisible"
|
:before-close="handleClose"
|
append-to-body
|
>
|
<div class="fl-f">
|
<div class="fl-f">
|
<div class="text-label fc-999">组织名称:</div>
|
<div class="text-box">{{ dataInfo.name }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">统一社会信用代码:</div>
|
<div class="text-box">{{ dataInfo.name }}</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">法定代表人:</div>
|
<div class="text-box">{{ dataInfo.name }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">联系电话:</div>
|
<div class="text-box">{{ dataInfo.contactPhone }}</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">服务类型:</div>
|
<div class="text-box">{{ dataInfo.serviceName }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">组织类型:</div>
|
<div class="text-box" v-if="dataInfo.companyType === 1">社会团体</div>
|
<div class="text-box" v-if="dataInfo.companyType === 2">
|
民办非企业单位
|
</div>
|
<div class="text-box" v-if="dataInfo.companyType === 3">基金会</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">所属街道:</div>
|
<div class="text-box">{{ dataInfo.streetName }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">注册时间:</div>
|
<div class="text-box">{{ dataInfo.buildDate }}</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">地址:</div>
|
<div class="text-box">{{ dataInfo.maillingAddr }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">成立方式:</div>
|
<div class="text-box" v-if="dataInfo.buildType === 1">社区孵化</div>
|
<div class="text-box" v-if="dataInfo.buildType === 2">民政注册</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">业务范围:</div>
|
<div class="text-box">{{ dataInfo.businessScope }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">状态:</div>
|
<div class="text-box">
|
{{ dataInfo.status === 1 ? "启用" : "停用" }}
|
</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">组织介绍:</div>
|
<div class="text-box">{{ dataInfo.businessImpact }}</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10" v-if="dataInfo.attachUrl">
|
<div class="fl-f">
|
<div class="text-label fc-999">组织标识:</div>
|
<div class="text-box">
|
<el-image
|
style="width: 100px; height: 100px"
|
:src="dataInfo.attachUrl"
|
:preview-src-list="[dataInfo.attachUrl]"
|
>
|
</el-image>
|
</div>
|
</div>
|
</div>
|
<div class="fl-f mr-t-10">
|
<div class="fl-f">
|
<div class="text-label fc-999">管理员账号:</div>
|
<div class="text-box">{{ dataInfo.account }}</div>
|
</div>
|
<div class="fl-f">
|
<div class="text-label fc-999">密码:</div>
|
<div class="text-box">{{ dataInfo.password }}</div>
|
</div>
|
</div>
|
<div class="fl-cen mr-t-30">
|
<el-button @click="dialogVisible = false">重置密码</el-button>
|
<el-button @click="dialogVisible = false">关 闭</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { mapState } from "vuex";
|
export default {
|
props: {},
|
components: {},
|
data() {
|
return {
|
dialogVisible: false,
|
bar: [
|
{ title: "关键字", name: "keyword" },
|
{
|
title: "组织类型",
|
name: "type",
|
type: "select",
|
list: [
|
{ value: null, label: "全部类型" },
|
{
|
value: 1,
|
label: "社会团体",
|
},
|
{
|
value: 2,
|
label: "民办非企业单位",
|
},
|
{
|
value: 3,
|
label: "基金会",
|
},
|
],
|
},
|
{
|
title: "状态",
|
name: "status",
|
type: "select",
|
list: [
|
{
|
value: null,
|
label: "全部",
|
},
|
{
|
value: 1,
|
label: "启用",
|
},
|
{
|
value: 0,
|
label: "停用",
|
},
|
],
|
},
|
{
|
title: "服务类型",
|
name: "type2",
|
type: "select",
|
list: [{ value: null, label: "全部" }],
|
},
|
{
|
title: "所属街道",
|
name: "streetId",
|
type: "select",
|
list: [],
|
},
|
],
|
trs: [
|
{ text: "序号", val: "id", width: "50px" },
|
{ text: "组织名称", val: "name" },
|
{ text: "统一社会信用代码", val: "agencyCode" },
|
{ text: "法定代表人", val: "corporationName" },
|
{ text: "联系电话", val: "contactPhone" },
|
{ text: "组织类型", val: "btn", slot: "companyType" },
|
{ text: "服务类型", val: "serviceName" },
|
{ text: "所属社区", val: "communityName" },
|
{ text: "成立方式", val: "btn", slot: "buildType" },
|
{ text: "注册时间", val: "buildDate" },
|
{ text: "状态", val: "btn", slot: "status" },
|
{ text: "操作", val: "btn", slot: "btn", width: "160px" },
|
],
|
tds: [],
|
paged: { page: 0, total: 0, r: 0, limit: 10 },
|
search: {},
|
dataInfo: {},
|
userType: null,
|
};
|
},
|
computed: {
|
...mapState({ vuex_page: "pageReset" }),
|
},
|
watch: {
|
vuex_page: {
|
handler(n) {
|
if (n.page === this.$route.path) {
|
this.init();
|
}
|
},
|
deep: true,
|
},
|
},
|
methods: {
|
handleClose() {
|
this.dialogVisible = false;
|
},
|
onSearch(v) {
|
this.search = demo.copy(v);
|
this.paged.page = 1;
|
this.init();
|
},
|
// 分页点击
|
onPage(v) {
|
if (v.page === this.paged.page && v.page && !v.reset) {
|
return 0;
|
}
|
this.paged.page = v.page;
|
this.paged.limit = v.limit;
|
this.init();
|
},
|
// 获取数据
|
init() {
|
let v = demo.copy(
|
Object.assign(this.search, {
|
page: this.paged.page,
|
size: this.paged.limit,
|
paramId2: 1,
|
})
|
);
|
this.$api.post("comActSocialOrg/queryAll", v, (e) => {
|
this.paged.total = e.total;
|
this.paged.r++;
|
this.tds = e.records || [];
|
});
|
},
|
// 页面操作
|
clickHandle(type, row) {
|
switch (type) {
|
case "add": {
|
this.$router.push("/addOrganize");
|
break;
|
}
|
case "serve": {
|
this.$router.push("/serveType?type=1");
|
break;
|
}
|
case "edit": {
|
this.$router.push("/addOrganize?id=" + row.id);
|
break;
|
}
|
case "details": {
|
this.$api.get("comActSocialOrg/" + row.id, {}, (e) => {
|
this.dataInfo = e;
|
this.dialogVisible = true;
|
});
|
break;
|
}
|
case "delete": {
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
}).then(() => {
|
this.$api.get("comActSocialOrg/del", { id: row.id }, () => {
|
demo.toast("删除成功");
|
this.init();
|
});
|
return;
|
});
|
break;
|
}
|
default: {
|
break;
|
}
|
}
|
},
|
},
|
mounted() {
|
this.userType = demo.$session.get("user").userType;
|
if (this.userType === 2) {
|
this.bar.length = 4;
|
} else {
|
this.$api.post(
|
"streetmanager/pagestreet",
|
{
|
pageNum: 1,
|
pageSize: 999999,
|
},
|
(e) => {
|
e.data.records.forEach((item) => {
|
this.bar[4].list.push({
|
value: item.streetId,
|
label: item.name,
|
});
|
});
|
}
|
);
|
}
|
this.$api.post(
|
"comActColumn/queryAll",
|
{
|
page: 1,
|
size: 999999,
|
type: 1,
|
},
|
(e) => {
|
e.records.forEach((item) => {
|
this.bar[3].list.push({
|
value: item.id,
|
label: item.name,
|
});
|
});
|
}
|
);
|
},
|
};
|
</script>
|
<style scoped>
|
.custom-scroll {
|
overflow: scroll;
|
}
|
.text-label {
|
width: 150px;
|
text-align: right;
|
}
|
.text-box {
|
width: 200px;
|
}
|
</style>
|