123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923 |
- <template>
- <div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- size="small"
- :inline="true"
- v-show="showSearch"
- label-width="88px"
- >
- <el-form-item label="部门名称" prop="deptId">
- <el-select filterable v-model="queryParams.deptId" placeholder="请选择">
- <el-option
- v-for="item in detpList"
- :key="item.value"
- :label="item.deptName"
- :value="item.deptId"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="法定代表人" prop="fddbr">
- <el-input v-model="queryParams.fddbr" placeholder="请输入"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button
- type="primary"
- icon="el-icon-search"
- size="mini"
- @click="handleQuery"
- >搜索</el-button
- >
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
- >重置</el-button
- >
- </el-form-item>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['business:GARDENBASEDATA:add']"
- >新增</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['business:GARDENBASEDATA:edit']"
- >修改</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['business:GARDENBASEDATA:remove']"
- >删除</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['business:GARDENBASEDATA:export']"
- >导出</el-button
- >
- </el-col>
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
- </el-row>
- <el-table
- :data="GARDENBASEDATAList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="园区内企业基础数据主键" align="center" prop="id">
- </el-table-column>
- <el-table-column label="部门主键" align="center" prop="deptId">
- </el-table-column>
- <el-table-column label="部门名称" align="center" prop="deptName">
- </el-table-column>
- <el-table-column label="法定代表人 " align="center" prop="fddbr">
- </el-table-column>
- <el-table-column label="企业代表联系方式 " align="center" prop="qydblxfs">
- </el-table-column>
- <el-table-column label="控股企业 " align="center" prop="kgqy">
- </el-table-column>
- <el-table-column label="注册资金" align="center" prop="zczj">
- </el-table-column>
- <el-table-column label="行业大类 " align="center" prop="hydl">
- </el-table-column>
- <el-table-column label="行业小类 " align="center" prop="hyxl">
- </el-table-column>
- <el-table-column label="企业类型 " align="center" prop="qylx">
- </el-table-column>
- <el-table-column label="是否外资企业 " align="center" prop="sfwzqy">
- </el-table-column>
- <el-table-column label="经营状态 " align="center" prop="jyzt">
- </el-table-column>
- <el-table-column label="统一社会信用代码 " align="center" prop="shtyxydm">
- </el-table-column>
- <el-table-column label="企业海关编码 " align="center" prop="qyhgbm">
- </el-table-column>
- <el-table-column label="人员规模" align="center" prop="rygm">
- </el-table-column>
- <el-table-column label="成立日期 " align="center" prop="clrq">
- </el-table-column>
- <el-table-column label="投产时间 " align="center" prop="tcsj">
- </el-table-column>
- <el-table-column label="经营期限自 " align="center" prop="jyqxz">
- </el-table-column>
- <el-table-column label="经营期限至 " align="center" prop="jyqxz1">
- </el-table-column>
- <el-table-column label="注册地址 " align="center" prop="zcdz" show-overflow-tooltip>
- </el-table-column>
- <el-table-column label="主营业务 " align="center" prop="zyyw" show-overflow-tooltip>
- </el-table-column>
- <el-table-column label="经营范围 " align="center" prop="jyfw" show-overflow-tooltip>
- </el-table-column>
- <el-table-column label="外汇等级 " align="center" prop="grade">
- <template slot-scope="scope">
- <span v-if="scope.row.grade == 1">A</span>
- <span v-if="scope.row.grade == 2">B</span>
- <span v-if="scope.row.grade == 3">C</span>
- <span v-if="scope.row.grade == 4">D</span>
- </template>
- </el-table-column>
- <el-table-column label="企业结构 " align="center" prop="enterpriseStructure">
- <template slot-scope="scope">
- <span>{{ selectDictLabel(dict.type.enterprise_structure, scope.row.enterpriseStructure) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="企业资质 " align="center" prop="qyzz">
- </el-table-column>
- <el-table-column label="主要市场 " align="center" prop="zysc">
- </el-table-column>
- <el-table-column label="一般纳税人情况 " align="center" prop="ybnsrqk">
- </el-table-column>
- <el-table-column
- label="国家级奖项、发明专利 "
- align="center"
- prop="gjjjxfmzl"
- >
- </el-table-column>
- <el-table-column label="AEO情况 " align="center" prop="aeoqk">
- </el-table-column>
- <el-table-column
- label="检测、服务外包、文化服务创新 "
- align="center"
- prop="jcfwwbwhfwcx"
- >
- </el-table-column>
- <el-table-column label="创建时间" align="center" prop="createTime">
- </el-table-column>
- <el-table-column label="创建人" align="center" prop="createBy">
- </el-table-column>
- <el-table-column label="更新时间" align="center" prop="updateTime">
- </el-table-column>
- <el-table-column label="更新人" align="center" prop="updateBy">
- </el-table-column>
- <el-table-column
- fixed="right"
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['business:GARDENBASEDATA:edit']"
- >修改</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['business:GARDENBASEDATA:remove']"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改园区内企业基础数据对话框 -->
- <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="65%" append-to-body>
- <el-tabs v-model="tabMsg" type="border-card">
- <el-tab-pane name="basicMsg" label="企业基本信息">
- <el-form ref="forms" :model="form" :rules="rules" label-width="180px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="法定代表人" prop="fddbr">
- <el-input
- v-model="form.fddbr"
- placeholder="请输入法定代表人"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="部门" prop="deptName">
- <!-- 树状结构组件引用 -->
- <select-tree :param="detpList" :placeholder="'请选择部门'" :modelValue="form.deptName" @setNodeValue="handleNodeClick" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="企业代表联系方式 " prop="qydblxfs">
- <el-input
- v-model="form.qydblxfs"
- placeholder="请输入企业代表联系方式 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="注册资金" prop="zczj">
- <el-input
- v-model="form.zczj"
- placeholder="请输入注册资金"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="企业类型 " prop="qylx">
- <el-input
- v-model="form.qylx"
- placeholder="请输入企业类型 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="经营状态 " prop="jyzt">
- <el-input
- v-model="form.jyzt"
- placeholder="请输入经营状态 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="统一社会信用代码 " prop="shtyxydm">
- <el-input
- v-model="form.shtyxydm"
- placeholder="请输入统一社会信用代码 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="人员规模" prop="rygm">
- <el-input
- v-model="form.rygm"
- placeholder="请输入人员规模"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="成立日期 " prop="clrq">
- <!-- <el-input v-model="form.clrq" placeholder="请输入成立日期 "></el-input> -->
- <el-date-picker
- style="width: 100%"
- value-format="yyyy-MM-dd"
- @change="setUpTimeSelect"
- v-model="form.clrq"
- type="date"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="注册地址 " prop="zcdz">
- <el-input
- v-model="form.zcdz"
- placeholder="请输入注册地址 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="经营范围 " prop="jyfw">
- <el-input
- v-model="form.jyfw"
- placeholder="请输入经营范围 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="外汇等级" prop="grade">
- <el-select v-model="form.grade" placeholder="请选择" style="width: 100%">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="企业结构 " prop="enterpriseStructure">
- <el-select v-model="form.enterpriseStructure" placeholder="请选择" style="width: 100%">
- <el-option
- v-for="dict in dict.type.enterprise_structure"
- :key="dict.value"
- :label="dict.label"
- :value="dict.label"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="业务构成 " prop="businessEvents">
- <el-select v-model="form.businessEvents" placeholder="请选择" style="width: 100%">
- <el-option
- v-for="dict in dict.type.business_events"
- :key="dict.value"
- :label="dict.label"
- :value="dict.label"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- <!-- 额外信息 -->
- <el-tab-pane name="extraMsg" label="额外信息">
- <el-form ref="form" :model="form" :rules="rules" label-width="180px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="控股企业 " prop="kgqy">
- <el-input
- v-model="form.kgqy"
- placeholder="请输入控股企业 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="行业大类 " prop="hydl">
- <el-input
- v-model="form.hydl"
- placeholder="请输入行业大类 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="行业小类 " prop="hyxl">
- <el-input
- v-model="form.hyxl"
- placeholder="请输入行业小类 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="是否外资企业 " prop="sfwzqy">
- <el-input
- v-model="form.sfwzqy"
- placeholder="请输入是否外资企业 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="企业海关编码 " prop="qyhgbm">
- <el-input
- v-model="form.qyhgbm"
- placeholder="请输入企业海关编码 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="投产时间 " prop="tcsj">
- <!-- <el-input v-model="form.tcsj" placeholder="请输入投产时间 "></el-input> -->
- <el-date-picker
- value-format="yyyy-MM-dd"
- @change="putTimeSelect"
- v-model="form.tcsj"
- type="date"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="经营期限自 " prop="jyqxz">
- <el-input
- v-model="form.jyqxz"
- placeholder="请输入经营期限自 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="经营期限至 " prop="jyqxz1">
- <el-input
- v-model="form.jyqxz1"
- placeholder="请输入经营期限至 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="主营业务 " prop="zyyw">
- <el-input
- v-model="form.zyyw"
- placeholder="请输入主营业务 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="企业资质 " prop="qyzz">
- <el-input
- v-model="form.qyzz"
- placeholder="请输入企业资质 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="主要市场 " prop="zysc">
- <el-input
- v-model="form.zysc"
- placeholder="请输入主要市场 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="一般纳税人情况 " prop="ybnsrqk">
- <el-input
- v-model="form.ybnsrqk"
- placeholder="请输入一般纳税人情况 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="国家级奖项、发明专利 " prop="gjjjxfmzl">
- <el-input
- v-model="form.gjjjxfmzl"
- placeholder="请输入国家级奖项、发明专利 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="AEO情况 " prop="aeoqk">
- <el-input
- v-model="form.aeoqk"
- placeholder="请输入AEO情况 "
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item
- label="检测、服务外包、文化服务创新 "
- prop="jcfwwbwhfwcx"
- >
- <el-input
- v-model="form.jcfwwbwhfwcx"
- placeholder="请输入检测、服务外包、文化服务创新 "
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12"></el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- </el-tabs>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listGARDENBASEDATA,
- getGARDENBASEDATA,
- delGARDENBASEDATA,
- addGARDENBASEDATA,
- updateGARDENBASEDATA,
- getEnterprise,
- } from "@/api/portal/GARDENBASEDATA/GARDENBASEDATA";
- import "@riophae/vue-treeselect/dist/vue-treeselect.css";
- import selectTree from '@/components/selectTree'
- export default {
- name: "GARDENBASEDATA",
- components: { selectTree },
- dicts: ['enterprise_structure', 'business_events'],
- data() {
- return {
- // 新增标签索引
- tabMsg: "basicMsg",
- // 部门列表
- detpList: [],
- // 根路径
- baseURL: process.env.VUE_APP_BASE_API,
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 园区内企业基础数据表格数据
- GARDENBASEDATAList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- id: null,
- deptId: null,
- fddbr: null,
- qydblxfs: null,
- kgqy: null,
- zczj: null,
- hydl: null,
- hyxl: null,
- qylx: null,
- sfwzqy: null,
- jyzt: null,
- shtyxydm: null,
- qyhgbm: null,
- rygm: null,
- clrq: null,
- tcsj: null,
- jyqxz: null,
- jyqxz1: null,
- zcdz: null,
- zyyw: null,
- jyfw: null,
- qyzz: null,
- zysc: null,
- ybnsrqk: null,
- gjjjxfmzl: null,
- aeoqk: null,
- jcfwwbwhfwcx: null,
- createTime: null,
- createBy: null,
- updateTime: null,
- updateBy: null,
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- id: [
- {
- required: true,
- message: "园区内企业基础数据主键不能为空",
- trigger: "blur",
- },
- ],
- deptName: [
- { required: true, message: "部门不能为空", trigger: "blur" },
- ],
- fddbr: [
- { required: true, message: "法定代表人 不能为空", trigger: "blur" },
- ],
- qydblxfs: [
- {
- required: true,
- message: "企业代表联系方式 不能为空",
- trigger: "blur",
- },
- ],
- kgqy: [
- { required: true, message: "控股企业 不能为空", trigger: "blur" },
- ],
- zczj: [
- { required: true, message: "注册资金不能为空", trigger: "blur" },
- {
- pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
- message: "不能为负数",
- trigger: "blur"
- }
- ],
- hydl: [
- { required: true, message: "行业大类 不能为空", trigger: "blur" },
- ],
- hyxl: [
- { required: true, message: "行业小类 不能为空", trigger: "blur" },
- ],
- qylx: [
- { required: true, message: "企业类型 不能为空", trigger: "blur" },
- ],
- sfwzqy: [
- { required: true, message: "是否外资企业 不能为空", trigger: "blur" },
- ],
- jyzt: [
- { required: true, message: "经营状态 不能为空", trigger: "blur" },
- ],
- shtyxydm: [
- {
- required: true,
- message: "统一社会信用代码 不能为空",
- trigger: "blur",
- },
- ],
- qyhgbm: [
- { required: true, message: "企业海关编码 不能为空", trigger: "blur" },
- ],
- rygm: [
- { required: true, message: "人员规模不能为空", trigger: "blur" },
- {
- pattern: /^[1-9]\d*$/,
- message: "请输入正整数",
- trigger: "blur"
- }
- ],
- clrq: [
- { required: true, message: "成立日期 不能为空", trigger: "blur" },
- ],
- tcsj: [
- { required: true, message: "投产时间 不能为空", trigger: "blur" },
- ],
- jyqxz: [
- { required: true, message: "经营期限自 不能为空", trigger: "blur" },
- ],
- jyqxz1: [
- { required: true, message: "经营期限至 不能为空", trigger: "blur" },
- ],
- zcdz: [
- { required: true, message: "注册地址 不能为空", trigger: "blur" },
- ],
- zyyw: [
- { required: true, message: "主营业务 不能为空", trigger: "blur" },
- ],
- jyfw: [
- { required: true, message: "经营范围 不能为空", trigger: "blur" },
- ],
- qyzz: [
- { required: true, message: "企业资质 不能为空", trigger: "blur" },
- ],
- zysc: [
- { required: true, message: "主要市场 不能为空", trigger: "blur" },
- ],
- ybnsrqk: [
- {
- required: true,
- message: "一般纳税人情况 不能为空",
- trigger: "blur",
- },
- ],
- gjjjxfmzl: [
- {
- required: true,
- message: "国家级奖项、发明专利 不能为空",
- trigger: "blur",
- },
- ],
- aeoqk: [
- { required: true, message: "AEO情况 不能为空", trigger: "blur" },
- ],
- jcfwwbwhfwcx: [
- {
- required: true,
- message: "检测、服务外包、文化服务创新 不能为空",
- trigger: "blur",
- },
- ],
- grade: [
- { required: true, message: "外汇等级 不能为空", trigger: "blur" },
- ],
- enterpriseStructure: [
- { required: true, message: "企业结构 不能为空", trigger: "blur" },
- ],
- businessEvents: [
- { required: true, message: "业务构成 不能为空", trigger: "blur" },
- ]
- },
- options: [{
- value: 1,
- label: 'A'
- }, {
- value: 2,
- label: 'B'
- }, {
- value: 3,
- label: 'C'
- }, {
- value: 4,
- label: 'D'
- }],
- value: ''
- };
- },
- created() {
- this.getList();
- getEnterprise().then((res) => {
- this.detpList = res.data
- });
- },
- methods: {
- changeIsShowStatus(val) {
- this.isShowStatus = val;
- },
- handleNodeClick(data) {
- this.$set(this.form, 'deptId', data.deptId)
- this.$set(this.form, 'deptName', data.deptName)
- },
- setUpTimeSelect(val) {
- this.form.clrq = val;
- },
- putTimeSelect(val) {
- this.form.tcsj = val;
- },
- /** 查询园区内企业基础数据列表 */
- getList() {
- this.loading = true;
- listGARDENBASEDATA(this.queryParams).then((response) => {
- this.GARDENBASEDATAList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.tabMsg = "basicMsg";
- this.form = {
- id: null,
- deptId: null,
- fddbr: null,
- qydblxfs: null,
- kgqy: null,
- zczj: null,
- hydl: null,
- hyxl: null,
- qylx: null,
- sfwzqy: null,
- jyzt: null,
- shtyxydm: null,
- qyhgbm: null,
- rygm: null,
- clrq: null,
- tcsj: null,
- jyqxz: null,
- jyqxz1: null,
- zcdz: null,
- zyyw: null,
- jyfw: null,
- qyzz: null,
- zysc: null,
- ybnsrqk: null,
- gjjjxfmzl: null,
- aeoqk: null,
- jcfwwbwhfwcx: null,
- };
- this.resetForm("form");
- this.resetForm("forms");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.queryParams.deptId = null;
- this.resetForm("queryForm");
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加园区内企业基础数据";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const id = row.id || this.ids;
- getGARDENBASEDATA(id).then((response) => {
- this.form = response.data;
- this.open = true;
- this.title = "修改园区内企业基础数据";
- });
- },
- /** 提交按钮 */
- submitForm() {
- let is;
- this.$refs["forms"].validate((valid)=>{
- if (valid) {
- }else{
- this.$message.error("请补齐企业基本信息")
- is = true;
- return;
- }
- });
- if (is) return;
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id != null) {
- updateGARDENBASEDATA(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addGARDENBASEDATA(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- } else {
- this.$message.error("请补齐额外信息");
- return;
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal
- .confirm('是否确认删除园区内企业基础数据编号为"' + ids + '"的数据项?')
- .then(function () {
- return delGARDENBASEDATA(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download(
- "business/GARDENBASEDATA/export",
- {
- ...this.queryParams,
- },
- `GARDENBASEDATA_${new Date().getTime()}.xlsx`
- );
- },
- },
- };
- </script>
- <style>
- .el-tooltip__popper{font-size: 14px; max-width:40% }/* 设置显示隐藏部分内容,按40%显示 */
- </style>
|