|
|
|
@ -1,91 +1,111 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="L-public-main" id="L-size-main">
|
|
|
|
|
<div class="L-main" style="padding: 0">
|
|
|
|
|
<header id="L-header">
|
|
|
|
|
<el-form
|
|
|
|
|
:inline="true"
|
|
|
|
|
:model="formInline"
|
|
|
|
|
size="small"
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
ref="queryFrom"
|
|
|
|
|
>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-form-item label="企业名称:" prop="qymc">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model.trim="formInline.qymc"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="企业规模:" prop="type">
|
|
|
|
|
<el-select
|
|
|
|
|
class="ignoreElement"
|
|
|
|
|
v-model="formInline.type"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
>
|
|
|
|
|
<el-option label="全部" value=""> </el-option>
|
|
|
|
|
<el-option label="规上服务业" value="1"> </el-option>
|
|
|
|
|
<el-option label="规上工业" value="3"> </el-option>
|
|
|
|
|
<el-option label="总部企业" value="4"> </el-option>
|
|
|
|
|
<el-option label="生产性服务业" value="5"> </el-option>
|
|
|
|
|
<el-option label="限上批零住餐" value="6"> </el-option>
|
|
|
|
|
<el-option label="生活性服务业" value="7"> </el-option>
|
|
|
|
|
<el-option label="其他" value="2"> </el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="企业自选列表"
|
|
|
|
|
:visible.sync="activeEnterpriseView"
|
|
|
|
|
width="1200px"
|
|
|
|
|
append-to-body
|
|
|
|
|
destroy-on-close
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
>
|
|
|
|
|
<div class="L-public-main" id="L-size-main">
|
|
|
|
|
<div class="L-main" style="padding: 0">
|
|
|
|
|
<header id="L-header">
|
|
|
|
|
<el-form
|
|
|
|
|
:inline="true"
|
|
|
|
|
:model="formInline"
|
|
|
|
|
size="small"
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
ref="queryFrom"
|
|
|
|
|
>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-form-item label="企业名称:" prop="qymc">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model.trim="formInline.qymc"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="企业规模:" prop="type">
|
|
|
|
|
<el-select
|
|
|
|
|
class="ignoreElement"
|
|
|
|
|
v-model="formInline.type"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
>
|
|
|
|
|
<el-option label="全部" value=""> </el-option>
|
|
|
|
|
<el-option label="规上服务业" value="1"> </el-option>
|
|
|
|
|
<el-option label="规上工业" value="3"> </el-option>
|
|
|
|
|
<el-option label="总部企业" value="4"> </el-option>
|
|
|
|
|
<el-option label="生产性服务业" value="5"> </el-option>
|
|
|
|
|
<el-option label="限上批零住餐" value="6"> </el-option>
|
|
|
|
|
<el-option label="生活性服务业" value="7"> </el-option>
|
|
|
|
|
<el-option label="其他" value="2"> </el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button size="mini" @click="resetQuery('queryFrom')"
|
|
|
|
|
>重置</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleQuery('queryFrom')"
|
|
|
|
|
>查询</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-form>
|
|
|
|
|
</header>
|
|
|
|
|
<section>
|
|
|
|
|
<el-table
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
:height="tabHeader"
|
|
|
|
|
:max-height="tabHeader"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" align="center" width="50" />
|
|
|
|
|
<el-table-column label="企业名称" prop="qymc" />
|
|
|
|
|
<el-table-column label="统一社会信用代码" prop="tyshxydm" />
|
|
|
|
|
<!-- <el-table-column label="法定代表人" prop="policyLevel" />
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button size="mini" @click="resetQuery('queryFrom')"
|
|
|
|
|
>重置</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleQuery('queryFrom')"
|
|
|
|
|
>查询</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button size="mini" type="primary" @click="ConfirmSelct()"
|
|
|
|
|
>确定勾选</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-form>
|
|
|
|
|
</header>
|
|
|
|
|
<section>
|
|
|
|
|
<!-- @selection-change="handleSelectionChange"
|
|
|
|
|
row-key="tyshxydm" -->
|
|
|
|
|
<el-checkbox-group v-model="selectList" @change="CheckboxChange">
|
|
|
|
|
<el-table
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
:height="tabHeader"
|
|
|
|
|
:max-height="tabHeader"
|
|
|
|
|
cell-class-name="tablecell"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column width="45" center>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-checkbox :label="scope.row.tyshxydm"> </el-checkbox>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="企业名称" prop="qymc" />
|
|
|
|
|
<el-table-column label="统一社会信用代码" prop="tyshxydm" />
|
|
|
|
|
<!-- <el-table-column label="法定代表人" prop="policyLevel" />
|
|
|
|
|
<el-table-column label="经营状态" prop="enterTime" />
|
|
|
|
|
<el-table-column label="成立日期" prop="createBy" />
|
|
|
|
|
<el-table-column label="注册资本" prop="createTime" /> -->
|
|
|
|
|
<!-- <el-table-column label="经济类型" prop="jjlxmc" /> -->
|
|
|
|
|
<!-- <el-table-column label="登记注册统计类别" prop="statisticalCategories" /> -->
|
|
|
|
|
<el-table-column label="企业类型" prop="qylxmc" />
|
|
|
|
|
<!-- <el-table-column label="行业名称" prop="hymc" /> -->
|
|
|
|
|
<!-- <el-table-column label="经济类型" prop="jjlxmc" /> -->
|
|
|
|
|
<!-- <el-table-column label="登记注册统计类别" prop="statisticalCategories" /> -->
|
|
|
|
|
<el-table-column label="企业类型" prop="qylxmc" />
|
|
|
|
|
<!-- <el-table-column label="行业名称" prop="hymc" /> -->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="成立日期" prop="clrq" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.clrq, "{y}-{m}-{d}") }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<my-pagination
|
|
|
|
|
id="L-pagination"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page="pagination.current"
|
|
|
|
|
:limit="pagination.size"
|
|
|
|
|
@pagination="getPagination"
|
|
|
|
|
:current-page.sync="pagination.current"
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</section>
|
|
|
|
|
<el-table-column label="成立日期" prop="clrq" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.clrq, "{y}-{m}-{d}") }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
<my-pagination
|
|
|
|
|
id="L-pagination"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page="pagination.current"
|
|
|
|
|
:limit="pagination.size"
|
|
|
|
|
@pagination="getPagination"
|
|
|
|
|
:current-page.sync="pagination.current"
|
|
|
|
|
></my-pagination>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/Pagination/index.vue";
|
|
|
|
@ -96,8 +116,10 @@ import {
|
|
|
|
|
enterpriseBasicInfoChange,
|
|
|
|
|
enterpriseBasicInfoId,
|
|
|
|
|
enterpriseBasicInfoDel,
|
|
|
|
|
getenterpriseByName,
|
|
|
|
|
} from "@/api/jin_ji_hu/enterList";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
import { Checkbox } from "element-ui";
|
|
|
|
|
export default {
|
|
|
|
|
components: { myPagination },
|
|
|
|
|
dicts: ["jjh_project_type"],
|
|
|
|
@ -106,6 +128,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
activeEnterpriseView: false,
|
|
|
|
|
rowList: [],
|
|
|
|
|
userType: this.$store.state.user.userType,
|
|
|
|
|
roles: this.$store.state.user.roles,
|
|
|
|
@ -167,14 +190,15 @@ export default {
|
|
|
|
|
uploadList: [],
|
|
|
|
|
// 导出遮罩层
|
|
|
|
|
exportLoading: false,
|
|
|
|
|
selectList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
value: {
|
|
|
|
|
handler(val) {
|
|
|
|
|
console.log("监听", val.length);
|
|
|
|
|
if (val) {
|
|
|
|
|
this.rowList = val;
|
|
|
|
|
this.selectList = val.map((it) => it.creditCode);
|
|
|
|
|
console.log("监听", this.selectList.length);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deep: true,
|
|
|
|
@ -188,57 +212,22 @@ export default {
|
|
|
|
|
this.formInline.qymc = this.$route.params.enterpriseName;
|
|
|
|
|
this.pagination = { ...this.pagination, ...this.formInline };
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener("resize", this.cancalDebounce);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// // 回显记录是否被选中
|
|
|
|
|
toggleSelection() {
|
|
|
|
|
if (this.rowList.length > 0) {
|
|
|
|
|
this.rowList.map((row) => {
|
|
|
|
|
const newItem = this.tableData.filter(
|
|
|
|
|
(item) => item.tyshxydm == row.creditCode
|
|
|
|
|
);
|
|
|
|
|
if (newItem.length > 0) {
|
|
|
|
|
this.$refs.multipleTable.toggleRowSelection(newItem[0]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
|
|
}
|
|
|
|
|
showDialog() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.activeEnterpriseView = true;
|
|
|
|
|
},
|
|
|
|
|
// /**
|
|
|
|
|
// * 企业勾选
|
|
|
|
|
// */
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
const combinedArray = [
|
|
|
|
|
...val,
|
|
|
|
|
...this.rowList.map((item) => ({
|
|
|
|
|
qymc: item.enterpriseName,
|
|
|
|
|
tyshxydm: item.creditCode,
|
|
|
|
|
})),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const uniqueArray = Array.from(
|
|
|
|
|
combinedArray
|
|
|
|
|
.reduce((map, item) => {
|
|
|
|
|
if (!map.has(item.tyshxydm)) {
|
|
|
|
|
map.set(item.tyshxydm, item);
|
|
|
|
|
}
|
|
|
|
|
return map;
|
|
|
|
|
}, new Map())
|
|
|
|
|
.values()
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const list = uniqueArray.map((item) => {
|
|
|
|
|
return {
|
|
|
|
|
enterpriseName: item.qymc,
|
|
|
|
|
creditCode: item.tyshxydm,
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
this.$emit("input", list);
|
|
|
|
|
async ConfirmSelct() {
|
|
|
|
|
let res = await getenterpriseByName(this.selectList);
|
|
|
|
|
this.$emit("input", res.data);
|
|
|
|
|
this.activeEnterpriseView = false;
|
|
|
|
|
},
|
|
|
|
|
CheckboxChange() {
|
|
|
|
|
console.log(this.selectList);
|
|
|
|
|
},
|
|
|
|
|
// 列表获取
|
|
|
|
|
getList() {
|
|
|
|
@ -247,12 +236,9 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.tableData = res.data.records;
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.toggleSelection();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 获取页码
|
|
|
|
|
getPagination(pages) {
|
|
|
|
|
this.pagination.current = pages.page;
|
|
|
|
@ -375,7 +361,7 @@ export default {
|
|
|
|
|
// 删除文件
|
|
|
|
|
handleDelete(index) {
|
|
|
|
|
this.fileList.splice(index, 1);
|
|
|
|
|
this.$emit("input", this.listToString(this.fileList));
|
|
|
|
|
// this.$emit("input", this.listToString(this.fileList));
|
|
|
|
|
},
|
|
|
|
|
// 获取文件名称
|
|
|
|
|
getFileName(name) {
|
|
|
|
@ -416,3 +402,5 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|
|
|
|
|