| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="计划编号" prop="planNo"> |
| | | <el-input |
| | | v-model="queryParams.planNo" |
| | | placeholder="请输入计划编号" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-form :model="queryParams" ref="queryRef" class="evenly-distributed-labels" :inline="true" v-show="showSearch" |
| | | label-width="80px" label-position="left"> |
| | | <el-form-item label="计划名称" prop="companyName"> |
| | | <el-input v-model="queryParams.planName" placeholder="请输入计划名称" clearable style="width: 200px" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="计划名称" prop="planName"> |
| | | <el-input |
| | | v-model="queryParams.planName" |
| | | placeholder="请输入计划名称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-form-item label="计划编号" prop="companyCode"> |
| | | <el-input v-model="queryParams.planNo" placeholder="请输入计划编号" clearable style="width: 200px" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="执法时间" prop="companyPhone"> |
| | | <el-date-picker |
| | | v-model="queryParams.value1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | @change="changeDate" |
| | | style="width: 220px;" |
| | | /> |
| | | <el-form-item label="执法单位" prop="companyUser"> |
| | | <el-input v-model="queryParams.companyUser" placeholder="请输入执法单位" clearable style="width: 200px" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="执法时间" style="width: 290px"> |
| | | <el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-" |
| | | start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> |
| | | </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-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="Refresh" @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="['system:manage:add']" |
| | | >新增</el-button> |
| | | <el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['system:dept: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="['system:manage:edit']" |
| | | >修改</el-button> |
| | | <el-button type="info" plain icon="Upload" @click="handleImport" |
| | | v-hasPermi="['system:user:import']">导入</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="['system:manage:remove']" |
| | | >删除</el-button> |
| | | <el-button type="primary" plain icon="Download" @click="downLoadCode">导出</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:manage:export']" |
| | | >导出</el-button> |
| | | <el-button type="primary" plain icon="Download" @click="downLoadCode">发起综合查一次</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="manageList" @selection-change="handleSelectionChange"> |
| | | <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="companyId" |
| | | :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="计划编号" align="center" prop="planNo" /> |
| | | <el-table-column label="计划名称" align="center" prop="planName" /> |
| | | <el-table-column label="制定机构" align="center" prop="makeOrgName" /> |
| | | <el-table-column label="被检查对象" align="center" prop="checkdObject" /> |
| | | <el-table-column label="统一社会信用代码" align="center" prop="unifiedSocialCreditCode" /> |
| | | <el-table-column label="所属行业" align="center" prop="industry" /> |
| | | <el-table-column label="检查方式" align="center" prop="checkdType" /> |
| | | <el-table-column label="检查内容" align="center" prop="checkdContent" /> |
| | | <el-table-column label="执行科室" align="center" prop="executiveSection" /> |
| | | <el-table-column label="计划频率" align="center" prop="planFrequency" /> |
| | | <el-table-column label="计划月份" align="center" prop="planMonth" /> |
| | | <el-table-column label="计划状态" align="center" prop="planStatus" /> |
| | | <el-table-column 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="['system:manage:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:manage:remove']" |
| | | >删除</el-button> |
| | | <el-table-column prop="planNo" label="计划编号" width="180"></el-table-column> |
| | | <el-table-column prop="planName" label="计划名称" width="180"></el-table-column> |
| | | <el-table-column prop="makeOrgName" label="制定机构" width="180"></el-table-column> |
| | | <el-table-column prop="checkdObject" label="被检查对象" width="180"></el-table-column> |
| | | <el-table-column prop="unifiedSocialCreditCode" label="统一社会信用代码" width="180"></el-table-column> |
| | | <el-table-column prop="industry" label="所属行业" width="180"></el-table-column> |
| | | <el-table-column prop="checkdType" label="检查方式" width="180"></el-table-column> |
| | | <el-table-column prop="checkdContent" label="检查内容" width="180"></el-table-column> |
| | | <el-table-column prop="executiveSection" label="执行科室" width="180"></el-table-column> |
| | | <el-table-column prop="planFrequency" label="计划频次" width="180"></el-table-column> |
| | | <el-table-column prop="planMonth" label="计划月份" width="180"></el-table-column> |
| | | <el-table-column prop="planStatus" label="状态" width="180"></el-table-column> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="240"> |
| | | <template #default="scope"> |
| | | <el-link type="info" @click="createQrcodeHandler(scope.row)">查看</el-link> |
| | | <el-divider direction="vertical" /> |
| | | <el-link type="primary" @click="handleAdd(scope.row)">编辑</el-link> |
| | | <el-divider direction="vertical" /> |
| | | <el-link type="error" @click="handleDelete(scope.row)">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-show="queryParams.total > 0" :total="queryParams.total" v-model:page="queryParams.pageNum" |
| | | v-model:limit="queryParams.pageSize" @pagination="getList" /> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- 添加或修改计划管理对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="计划编号" prop="planNo"> |
| | | <el-input v-model="form.planNo" placeholder="请输入计划编号" /> |
| | | </el-form-item> |
| | | <el-form-item label="计划名称" prop="planName"> |
| | | <el-input v-model="form.planName" placeholder="请输入计划名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="计划频率" prop="planFrequency"> |
| | | <el-input v-model="form.planFrequency" placeholder="请输入计划频率" /> |
| | | </el-form-item> |
| | | <el-form-item label="计划月份" prop="planMonth"> |
| | | <el-input v-model="form.planMonth" placeholder="请输入计划月份" /> |
| | | </el-form-item> |
| | | <el-form-item label="指定计划的机构" prop="makeOrgName"> |
| | | <el-input v-model="form.makeOrgName" placeholder="请输入指定计划的机构" /> |
| | | </el-form-item> |
| | | <el-form-item label="被检查的对象" prop="checkdObject"> |
| | | <el-input v-model="form.checkdObject" placeholder="请输入被检查的对象" /> |
| | | </el-form-item> |
| | | <el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode"> |
| | | <el-input v-model="form.unifiedSocialCreditCode" placeholder="请输入统一社会信用代码" /> |
| | | </el-form-item> |
| | | <el-form-item label="行业" prop="industry"> |
| | | <el-input v-model="form.industry" placeholder="请输入行业" /> |
| | | </el-form-item> |
| | | <el-form-item label="检查内容"> |
| | | <editor v-model="form.checkdContent" :min-height="192"/> |
| | | </el-form-item> |
| | | <el-form-item label="执行科室" prop="executiveSection"> |
| | | <el-input v-model="form.executiveSection" placeholder="请输入执行科室" /> |
| | | </el-form-item> |
| | | <el-form-item label="逻辑删除" prop="delFlag"> |
| | | <el-input v-model="form.delFlag" placeholder="请输入逻辑删除" /> |
| | | </el-form-item> |
| | | <!-- 添加或修改对话框 --> |
| | | <el-dialog :title="title" v-model="open" width="700px" append-to-body> |
| | | <el-form ref="deptRef" :model="form" :rules="rules" label-width="140px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计划名称" prop="planName"> |
| | | <el-input v-model="form.planName" placeholder="请输入计划名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="制定计划的机构" prop="makeOrgName"> |
| | | <el-input v-model="form.makeOrgName" placeholder="请输入制定计划的机构" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被检查的对象" prop="checkdObject"> |
| | | <el-input v-model="form.checkdObject" placeholder="请输入被检查的对象" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode"> |
| | | <el-input v-model="form.unifiedSocialCreditCode" placeholder="请输入统一社会信用代码" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="行业" prop="industry"> |
| | | <el-input v-model="form.industry" placeholder="请输入行业" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="执行科室" prop="executiveSection"> |
| | | <el-input v-model="form.executiveSection" placeholder="请输入执行科室" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="检查内容" prop="checkdContent"> |
| | | <el-input v-model="form.checkdContent" type="textarea" placeholder="请输入检查内容" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计划频率" prop="planFrequency"> |
| | | <el-input v-model="form.planFrequency" placeholder="请输入计划频率" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计划月份" prop="planMonth"> |
| | | <el-input v-model="form.planMonth" placeholder="请输入计划月份" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-form-item label="状态"> |
| | | <el-switch v-model="form.companyStatus" :active-value="0" :inactive-value="1"></el-switch> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <exportRecord ref="exportRecordCom" :recordRow="recordRow" @uploadList="getList"></exportRecord> |
| | | <judgeCom ref="judgeComRef" @upload="getList"></judgeCom> |
| | | <createQrcode ref="createQrcodeRef"></createQrcode> |
| | | |
| | | <!-- 计划导入对话框 --> |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body> |
| | | <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <div class="el-upload__tip"><el-checkbox v-model="upload.updateSupport" />是否更新已经存在的计划数据</div> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">下载模板</el-link> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">确 定</el-button> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listManage, getManage, delManage, addManage, updateManage } from "@/api/system/manage"; |
| | | <script setup name="Dept"> |
| | | import { getToken } from "@/utils/auth"; |
| | | import { |
| | | listCompany, |
| | | addCompany, |
| | | updStatus, |
| | | delCompany, |
| | | updateCompany, |
| | | getCompany |
| | | } from "@/api/system/company/company"; |
| | | import { listManage ,exportTemplate} from "@/api/system/manage"; |
| | | import { computed } from "vue"; |
| | | import { judgeStatus, companyStatus, scopeList } from '@/utils/mapList/index.ts' |
| | | import useSettingsStore from "@/store/modules/settings"; |
| | | import {download as downloadHttp, download} from '@/utils/request'; // 下载文件 |
| | | const thcolor = computed(() => useSettingsStore().theme); |
| | | const { proxy } = getCurrentInstance(); |
| | | const { sys_normal_disable } = proxy.useDict("sys_normal_disable"); |
| | | const deptList = ref([]); |
| | | const open = ref(false); |
| | | const loading = ref(true); |
| | | const showSearch = ref(true); |
| | | const title = ref(""); |
| | | const deptOptions = ref([]); |
| | | const isExpandAll = ref(false); |
| | | const refreshTable = ref(true); |
| | | const exporttem = ref() |
| | | const exportRecordCom = ref() |
| | | const judgeComRef = ref() |
| | | const createQrcodeRef = ref() |
| | | const options = reactive({ |
| | | companyStatus: [ |
| | | { |
| | | label: '正常', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: 1 |
| | | }, |
| | | ], |
| | | }) |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | planNo: '', |
| | | planName: '', |
| | | value1: '', |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 1 |
| | | }, |
| | | rules: { |
| | | planName: [{ required: true, message: "计划名称不能为空", trigger: "blur" }], |
| | | makeOrgName: [{ required: true, message: "制定计划的机构不能为空", trigger: "blur" }], |
| | | checkdObject: [{ required: true, message: "被检查对象不能为空", trigger: "blur" }], |
| | | unifiedSocialCreditCode: [{ required: true, message: "统一社会信用代码不能为空", trigger: "blur" }], |
| | | industry: [{ required: true, message: "所属行业不能为空", trigger: "blur" }], |
| | | checkdContent: [{ required: true, message: "检查内容不能为空", trigger: "blur" }], |
| | | executiveSection: [{ required: true, message: "执行科室不能为空", trigger: "blur" }], |
| | | planFrequency: [{ required: true, message: "计划频次不能为空", trigger: "blur" }], |
| | | planMonth: [{ required: true, message: "计划月份不能为空", trigger: "blur" }], |
| | | }, |
| | | }); |
| | | |
| | | export default { |
| | | name: "Manage", |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 计划管理表格数据 |
| | | manageList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | value1: null, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | planNo: null, |
| | | planName: null, |
| | | planFrequency: null, |
| | | planMonth: null, |
| | | makeOrgName: null, |
| | | checkdObject: null, |
| | | unifiedSocialCreditCode: null, |
| | | industry: null, |
| | | checkdType: null, |
| | | checkdContent: null, |
| | | executiveSection: null, |
| | | planStatus: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | /*** 计划导入参数 */ |
| | | const upload = reactive({ |
| | | // 是否显示弹出层(用户导入) |
| | | open: false, |
| | | // 弹出层标题(用户导入) |
| | | title: "", |
| | | // 是否禁用上传 |
| | | isUploading: false, |
| | | // 是否更新已经存在的用户数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/system/manage/importData", |
| | | }); |
| | | /**文件上传中处理 */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | /** 文件上传成功处理 */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | upload.open = false; |
| | | upload.isUploading = false; |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { |
| | | dangerouslyUseHTMLString: true, |
| | | }); |
| | | getList(); |
| | | }; |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | const recordRow = ref([]) |
| | | /** 查询企业列表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | | listManage(queryParams.value).then((response) => { |
| | | deptList.value = response.rows |
| | | data.queryParams.total = response.total |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | /** 取消按钮 */ |
| | | function cancel() { |
| | | open.value = false; |
| | | reset(); |
| | | getList(); |
| | | } |
| | | /** 表单重置 */ |
| | | function reset() { |
| | | form.value = { |
| | | planName: '', // 计划名称 |
| | | makeOrgName: '', // 制定机构 |
| | | checkdObject: '', // 被检查对象 |
| | | unifiedSocialCreditCode: '', // 统一社会信用代码 |
| | | industry: '', // 所属行业 |
| | | checkdContent: '', // 检查内容 |
| | | executiveSection: '', // 执行科室 |
| | | planFrequency: '', // 计划频次 |
| | | planMonth: '', // 计划月份 |
| | | }; |
| | | proxy.resetForm("deptRef"); |
| | | } |
| | | const queryRef = ref() |
| | | /** 搜索按钮操作 */ |
| | | function handleQuery() { |
| | | getList(); |
| | | } |
| | | /** 重置按钮操作 */ |
| | | function resetQuery() { |
| | | queryRef.value.resetFields(); |
| | | handleQuery(); |
| | | } |
| | | function getDetails(id) { |
| | | getCompany(id).then((response) => { |
| | | form.value = response.data; |
| | | open.value = true; |
| | | // title.value = "查看企业"; |
| | | }); |
| | | } |
| | | /** 新增按钮操作 */ |
| | | function handleAdd(row) { |
| | | if (row) { |
| | | // form.value = row |
| | | title.value = "编辑计划"; |
| | | getDetails(row.companyId) |
| | | } else { |
| | | form.value = { |
| | | companyStatus: 0 |
| | | } |
| | | title.value = "添加计划"; |
| | | open.value = true; |
| | | } |
| | | } |
| | | |
| | | /** 提交按钮 */ |
| | | function submitForm() { |
| | | proxy.$refs["deptRef"].validate((valid) => { |
| | | if (valid) { |
| | | if (form.value.companyId != undefined) { |
| | | updateCompany(form.value).then((response) => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } else { |
| | | addCompany(form.value).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询计划管理列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listManage(this.queryParams).then(response => { |
| | | this.manageList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | planNo: null, |
| | | planName: null, |
| | | planFrequency: null, |
| | | planMonth: null, |
| | | makeOrgName: null, |
| | | checkdObject: null, |
| | | unifiedSocialCreditCode: null, |
| | | industry: null, |
| | | checkdType: null, |
| | | checkdContent: null, |
| | | executiveSection: null, |
| | | planStatus: null, |
| | | delFlag: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | changeDate() { |
| | | this.queryParams.beginTime = this.queryParams.value1[0] |
| | | this.queryParams.endTime = this.queryParams.value1[1] |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | 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 |
| | | getManage(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改计划管理"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateManage(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addManage(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除计划管理编号为"' + ids + '"的数据项?').then(function() { |
| | | return delManage(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/manage/export', { |
| | | ...this.queryParams |
| | | }, `manage_${new Date().getTime()}.xlsx`) |
| | | } |
| | | }); |
| | | } |
| | | /** 删除按钮操作 */ |
| | | function handleDelete(row) { |
| | | proxy.$modal |
| | | .confirm('是否确认删除该数据?') |
| | | .then(function () { |
| | | return delCompany({ delId: row.companyId }); |
| | | }) |
| | | .then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }) |
| | | .catch(() => { }); |
| | | } |
| | | |
| | | /** 导入按钮操作 */ |
| | | function handleImport() { |
| | | upload.title = "计划导入"; |
| | | upload.open = true; |
| | | } |
| | | |
| | | /** 提交上传文件 */ |
| | | function submitFileForm() { |
| | | proxy.$refs["uploadRef"].submit(); |
| | | } |
| | | |
| | | /** 下载模板操作 */ |
| | | function importTemplate() { |
| | | exportTemplate().then(val => { |
| | | downloadHttp('/tool/file/download', { |
| | | fileName: val.msg, |
| | | delete: true |
| | | }, "计划信息模板.xlsx") |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // 修改企业信息 |
| | | function changeCompanyNews(row, event) { |
| | | if (loading.value) { |
| | | return |
| | | } |
| | | updStatus(row).then(val => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | getList(); |
| | | }) |
| | | } |
| | | |
| | | function createQrcodeHandler(row) { |
| | | createQrcodeRef.value.openDialog(row) |
| | | } |
| | | let valueArr = [] |
| | | function downLoadCode() { |
| | | download('/system/company/downloadQrcode', { |
| | | companyIds: valueArr.join() |
| | | }, "企业图片.zip") |
| | | } |
| | | function handleSelectionChange(e) { |
| | | console.log(e) |
| | | valueArr = e.map(item => item.companyId) |
| | | } |
| | | getList(); |
| | | function selectableFun(e) { |
| | | console.log(e) |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .evenly-distributed-labels { |
| | | :deep() { |
| | | .el-form-item__label { |
| | | position: relative; |
| | | /* 设置相对定位作为星号的定位基准 */ |
| | | text-align: justify; |
| | | text-align-last: justify; |
| | | /* 确保最后一行也两端对齐 */ |
| | | padding-left: 10px; |
| | | /* 为星号预留空间 */ |
| | | display: inline-block; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | } |
| | | </style> |