| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <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="companyCode"> |
| | | <el-input v-model="queryParams.planNo" placeholder="请输入计划编号" clearable style="width: 200px" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <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="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="Plus" @click="handleAdd()" v-hasPermi="['system:dept:add']">新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="Upload" @click="exportExcel" |
| | | v-hasPermi="['system:dept:add']">导入</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="Download" @click="downLoadCode">导出</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" plain icon="Download" @click="downLoadCode">发起综合查一次</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <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 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" /> |
| | | |
| | | <!-- 添加或修改对话框 --> |
| | | <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> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <exportExcelCom ref="exporttem" @resList="resList"></exportExcelCom> |
| | | <exportRecord ref="exportRecordCom" :recordRow="recordRow" @uploadList="getList"></exportRecord> |
| | | <judgeCom ref="judgeComRef" @upload="getList"></judgeCom> |
| | | <createQrcode ref="createQrcodeRef"></createQrcode> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="Dept"> |
| | | // import FileUpload from '@/components/ImageUpload/index' |
| | | // import exportRecord from './components/exportRecord' |
| | | // import createQrcode from './components/createQrcode' |
| | | // import judgeCom from './components/judge' |
| | | import { listCompany, addCompany, updStatus, delCompany, updateCompany, getCompany } from "@/api/system/company/company"; |
| | | // import exportExcelCom from './components/export' |
| | | import { listManage } 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 } 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" }], |
| | | }, |
| | | }); |
| | | |
| | | 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(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | /** 删除按钮操作 */ |
| | | function handleDelete(row) { |
| | | proxy.$modal |
| | | .confirm('是否确认删除该数据?') |
| | | .then(function () { |
| | | return delCompany({ delId: row.companyId }); |
| | | }) |
| | | .then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }) |
| | | .catch(() => { }); |
| | | } |
| | | // 修改企业信息 |
| | | function changeCompanyNews(row, event) { |
| | | if (loading.value) { |
| | | return |
| | | } |
| | | updStatus(row).then(val => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | getList(); |
| | | }) |
| | | } |
| | | // 导入模板 |
| | | function exportExcel() { |
| | | exporttem.value.openDialog() |
| | | } |
| | | // 导入记录 |
| | | function exportRecordComOpen() { |
| | | exportRecordCom.value.openDialog() |
| | | } |
| | | function resList(row) { |
| | | recordRow.value = row |
| | | exportRecordCom.value.openDialog() |
| | | } |
| | | function checkJudge(row) { |
| | | judgeComRef.value.openDialog(row) |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | <template>
|
| | | <div class="app-container">
|
| | | <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.companyName"
|
| | | placeholder="请输入企业名称"
|
| | | clearable
|
| | | style="width: 200px"
|
| | | @keyup.enter="handleQuery"
|
| | | />
|
| | | </el-form-item>
|
| | | <el-form-item label="制定机构">
|
| | | <el-tree-select
|
| | | v-model="queryParams.applyOrgId"
|
| | | :data="deptOptions"
|
| | | :props="{ value: 'id', label: 'label', children: 'children' }"
|
| | | value-key="id"
|
| | | placeholder="请选择制定计划的机构"
|
| | | check-strictly
|
| | | style="width: 200px"
|
| | | />
|
| | | </el-form-item>
|
| | | <el-form-item label="执法时间" style="width: 290px">
|
| | | <el-date-picker
|
| | | v-model="dateRange"
|
| | | type="months"
|
| | | format="YYYY-MM"
|
| | | value-format="YYYY-MM"
|
| | | placeholder="请选择计划月份"
|
| | | @change="changeDateHandler"
|
| | | />
|
| | | </el-form-item>
|
| | | <el-form-item>
|
| | | <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="Plus"
|
| | | @click="handleAdd()"
|
| | | v-hasPermi="['system:dept:add']"
|
| | | >新增</el-button
|
| | | >
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="warning"
|
| | | plain
|
| | | icon="Upload"
|
| | | @click="handleImport"
|
| | | v-hasPermi="['system:user:import']"
|
| | | >导入</el-button
|
| | | >
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button type="success" plain icon="Download" @click="downLoadCode"
|
| | | >导出</el-button
|
| | | >
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button type="primary" plain icon="View" @click="downLoadCode"
|
| | | >发起综合查一次</el-button
|
| | | >
|
| | | </el-col>
|
| | | </el-row>
|
| | |
|
| | | <!-- @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' }"
|
| | | >
|
| | | <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
| | | <el-table-column prop="planNo" label="序号" width="55">
|
| | | <template #default="scope">{{ scope.$index + 1 }}</template>
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | | prop="orderNo"
|
| | | label="计划编号"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column
|
| | | prop="enforceReason"
|
| | | label="计划名称"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column
|
| | | prop="applyOrgName"
|
| | | label="制定机构"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column
|
| | | prop="companyName"
|
| | | label="被检查对象"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column
|
| | | prop="companyCode"
|
| | | label="统一社会信用代码"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column prop="industry" label="所属行业" width="180">
|
| | | <template #default="scope">{{
|
| | | industryToText(scope.row.industry)
|
| | | }}</template>
|
| | | </el-table-column>
|
| | | <el-table-column prop="enforceType" label="检查方式" width="180">
|
| | | <template #default="scope">{{
|
| | | methodToText(scope.row.enforceType)
|
| | | }}</template>
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | | prop="enforceContent"
|
| | | label="检查内容"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column
|
| | | prop="applyDeptNames"
|
| | | label="执行科室"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column prop="planFrequency" label="计划频次" width="180">
|
| | | <template #default="scope">{{ frequencyToText(scope.row) }} </template>
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | | prop="planMonth"
|
| | | label="计划月份"
|
| | | width="180"
|
| | | ></el-table-column>
|
| | | <el-table-column prop="orderStatus" label="状态" width="180">
|
| | | <template #default="scope">{{
|
| | | statusToText(scope.row.checkStatus)
|
| | | }}</template>
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | | label="操作"
|
| | | align="center"
|
| | | fixed="right"
|
| | | class-name="small-padding fixed-width"
|
| | | width="180"
|
| | | >
|
| | | <template #default="scope">
|
| | | <el-link type="info" @click="handleView(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"
|
| | | />
|
| | |
|
| | | <!-- 添加或修改对话框 -->
|
| | | <el-dialog
|
| | | :title="title"
|
| | | v-model="open"
|
| | | width="700px"
|
| | | @close="closeUpdHandler"
|
| | | append-to-body
|
| | | >
|
| | | <el-form ref="deptRef" :model="form" :rules="rules" label-width="140px">
|
| | | <el-row :gutter="20">
|
| | | <el-col :span="24">
|
| | | <el-form-item label="计划名称" prop="enforceReason">
|
| | | <el-input
|
| | | v-model="form.enforceReason"
|
| | | placeholder="请输入计划名称"
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <el-row :gutter="20">
|
| | | <el-col :span="12">
|
| | | <el-form-item label="制定计划的机构" prop="applyOrgId">
|
| | | <el-tree-select
|
| | | v-model="form.applyOrgId"
|
| | | :data="deptOptions"
|
| | | :props="{ value: 'id', label: 'label', children: 'children' }"
|
| | | value-key="id"
|
| | | placeholder="请选择制定计划的机构"
|
| | | check-strictly
|
| | | :default-expanded-keys="[form.applyOrgId]"
|
| | | :default-checked-keys="[form.applyOrgId]"
|
| | | @node-click="changeTreeHandler"
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="执行科室" prop="applyDeptIds">
|
| | | <el-select
|
| | | v-model="selectOffices"
|
| | | multiple
|
| | | collapse-tags
|
| | | collapse-tags-tooltip
|
| | | :max-collapse-tags="1"
|
| | | placeholder="请选择执行科室"
|
| | | style="width: 100%"
|
| | | @change="handleSelectOffices"
|
| | | >
|
| | | <el-option
|
| | | v-for="(obj, index) in officeList"
|
| | | :key="index"
|
| | | :label="obj.deptName"
|
| | | :value="obj.deptId"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <el-row :gutter="20" v-if="!form.orderId">
|
| | | <el-col :span="24">
|
| | | <el-form-item label="被检查的对象" prop="checkdIds">
|
| | | <el-button type="primary" @click="openFirmSelect"
|
| | | >选择企业</el-button
|
| | | >
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <el-row :gutter="20" v-else>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="被检查对象" prop="companyName">
|
| | | <el-input
|
| | | v-model="form.companyName"
|
| | | placeholder="请输入被检查对象"
|
| | | readonly
|
| | | disabled
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="统一社会信用代码" prop="companyCode">
|
| | | <el-input
|
| | | v-model="form.companyCode"
|
| | | placeholder="请输入统一社会信用代码"
|
| | | readonly
|
| | | disabled
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <el-row :gutter="20" v-if="form.checkdIds">
|
| | | <el-col :span="24">
|
| | | <el-form-item label="被检查对象信息">
|
| | | <el-table
|
| | | :data="checkedList"
|
| | | max-height="200px"
|
| | | style="width: 100%"
|
| | | >
|
| | | <el-table-column prop="companyName" label="企业名称" />
|
| | | <el-table-column prop="companyCode" label="统一社会信用代码" />
|
| | | </el-table>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <el-row :gutter="20">
|
| | | <el-col :span="12">
|
| | | <el-form-item label="检查方式" prop="enforceType">
|
| | | <el-select
|
| | | v-model="form.enforceType"
|
| | | placeholder="请选择检查方式"
|
| | | style="width: 100%"
|
| | | >
|
| | | <el-option
|
| | | v-for="(obj, index) in enforce_type"
|
| | | :key="index"
|
| | | :label="obj.label"
|
| | | :value="obj.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="所属行业" prop="industry">
|
| | | <el-select
|
| | | v-model="form.industry"
|
| | | placeholder="请选择所属行业"
|
| | | style="width: 100%"
|
| | | >
|
| | | <el-option
|
| | | v-for="(obj, index) in industry_type"
|
| | | :key="index"
|
| | | :label="obj.label"
|
| | | :value="obj.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <el-row :gutter="20">
|
| | | <el-col :span="24">
|
| | | <el-form-item label="检查内容" prop="enforceContent">
|
| | | <el-input
|
| | | v-model="form.enforceContent"
|
| | | 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="请输入频次">
|
| | | <template #append>
|
| | | <el-select
|
| | | v-model="form.planFrequencyUnit"
|
| | | placeholder="单位"
|
| | | style="width: 80px"
|
| | | >
|
| | | <el-option
|
| | | v-for="(obj, index) in frequency"
|
| | | :key="index"
|
| | | :label="obj.label"
|
| | | :value="obj.value"
|
| | | />
|
| | | </el-select> </template
|
| | | ></el-input>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="计划月份" prop="planMonth">
|
| | | <el-date-picker
|
| | | v-model="selectMonth"
|
| | | type="months"
|
| | | format="YYYY-MM"
|
| | | value-format="YYYY-MM"
|
| | | placeholder="请选择计划月份"
|
| | | @change="changeMonth"
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | </el-form>
|
| | | <template #footer>
|
| | | <div class="dialog-footer">
|
| | | <el-button type="primary" @click="submitForm">确 定</el-button>
|
| | | <el-button @click="cancel">取 消</el-button>
|
| | | </div>
|
| | | </template>
|
| | | </el-dialog>
|
| | |
|
| | | <!-- 计划导入对话框 -->
|
| | | <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>
|
| | |
|
| | | <!-- 计划详细 -->
|
| | | <el-dialog title="计划详情" v-model="planOpen" width="700px" append-to-body>
|
| | | <el-form label-width="140px">
|
| | | <el-row>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="计划编号:">{{
|
| | | planDetail.orderNo
|
| | | }}</el-form-item>
|
| | | <el-form-item label="计划名称:">{{
|
| | | planDetail.enforceReason
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="制定计划的机构:">{{
|
| | | planDetail.applyOrgName
|
| | | }}</el-form-item>
|
| | | <el-form-item label="被检查的对象:">{{
|
| | | planDetail.companyName
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="统一社会信用代码:">{{
|
| | | planDetail.companyCode
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="所属行业:">{{
|
| | | industryToText(planDetail.industry)
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="检查方式:">{{
|
| | | methodToText(planDetail.enforceType)
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="执行科室:">{{
|
| | | planDetail.applyDeptNames
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="24">
|
| | | <el-form-item label="检查内容:">{{
|
| | | planDetail.enforceContent
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="计划月份:">{{
|
| | | planDetail.planMonth
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="计划频次:">
|
| | | {{ frequencyToText(planDetail) }}
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="状态:">{{
|
| | | statusToText(planDetail.checkStatus)
|
| | | }}</el-form-item>
|
| | | </el-col>
|
| | | </el-row>
|
| | | </el-form>
|
| | | <template #footer>
|
| | | <div class="dialog-footer">
|
| | | <el-button
|
| | | @click="
|
| | | planOpen = false;
|
| | | planDetail = {};
|
| | | "
|
| | | >关 闭</el-button
|
| | | >
|
| | | </div>
|
| | | </template>
|
| | | </el-dialog>
|
| | |
|
| | | <!-- 选择企业弹窗 -->
|
| | | <el-dialog
|
| | | title="选择企业"
|
| | | v-model="selectOpen"
|
| | | width="700px"
|
| | | @close="closeSelect"
|
| | | append-to-body
|
| | | >
|
| | | <el-form label-width="120px">
|
| | | <el-row :gutter="10">
|
| | | <el-col :span="10">
|
| | | <el-form-item label="企业名称:">
|
| | | <el-input
|
| | | v-model="firmQueryParams.companyName"
|
| | | placeholder="请输入企业名称"
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="10">
|
| | | <el-form-item label="社会信用代码:">
|
| | | <el-input
|
| | | v-model="firmQueryParams.companyCode"
|
| | | placeholder="请输入社会信用代码"
|
| | | />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="4">
|
| | | <el-button type="primary" @click="getFirmList">搜索</el-button>
|
| | | </el-col>
|
| | | </el-row>
|
| | | </el-form>
|
| | | <el-table
|
| | | :data="firmList"
|
| | | row-key="companyId"
|
| | | height="400px"
|
| | | style="width: 100%"
|
| | | @selection-change="handleSelectionChange"
|
| | | >
|
| | | <el-table-column
|
| | | type="selection"
|
| | | width="55"
|
| | | :reserve-selection="false"
|
| | | />
|
| | | <el-table-column prop="companyName" label="企业名称" />
|
| | | <el-table-column prop="companyCode" label="统一社会信用代码" />
|
| | | <el-table-column prop="companyUser" width="100px" label="联系人" />
|
| | | <el-table-column prop="companyPhone" width="120px" label="手机号" />
|
| | | </el-table>
|
| | | <pagination
|
| | | v-show="firmQueryParams.total > 0"
|
| | | :total="firmQueryParams.total"
|
| | | v-model:page="firmQueryParams.pageNum"
|
| | | v-model:limit="firmQueryParams.pageSize"
|
| | | size="small"
|
| | | @pagination="getFirmList"
|
| | | />
|
| | | <template #footer>
|
| | | <div class="dialog-footer">
|
| | | <el-button type="primary" @click="closeSelect">确 定</el-button>
|
| | | <el-button @click="closeSelect">关 闭</el-button>
|
| | | </div>
|
| | | </template>
|
| | | </el-dialog>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script setup name="Dept">
|
| | | import { getToken } from "@/utils/auth";
|
| | | import {
|
| | | listManage,
|
| | | addManage,
|
| | | getManage,
|
| | | updateManage,
|
| | | delManage,
|
| | | exportTemplate,
|
| | | exportManage,
|
| | | getOrgId,
|
| | | } from "@/api/system/manage";
|
| | | import { listCompany } from "@/api/system/company/company";
|
| | | import { deptTreeSelect } from "@/api/system/user";
|
| | | import { listDept } from "@/api/system/dept";
|
| | | // import { download } from '@/utils/request'; // 下载文件
|
| | | import { download as downloadHttp } from "@/utils/request";
|
| | | const { proxy } = getCurrentInstance();
|
| | | const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
| | | const { frequency, industry_type, enforce_type } = proxy.useDictPer(
|
| | | "frequency",
|
| | | "industry_type",
|
| | | "enforce_type"
|
| | | );
|
| | |
|
| | | const statusOptions = ref([
|
| | | { label: "已撤回", value: -1 },
|
| | | { label: "待提交", value: 0 },
|
| | | { label: "已提交", value: 1 },
|
| | | { label: "已审批待执行", value: 2 },
|
| | | { label: "已执行待上报", value: 3 },
|
| | | { label: "已上报", value: 4 },
|
| | | ]);
|
| | | const deptList = ref([]);
|
| | | const open = ref(false);
|
| | | const loading = ref(true);
|
| | | const showSearch = ref(true);
|
| | | const title = ref("");
|
| | | const isExpandAll = ref(false);
|
| | | const refreshTable = ref(true);
|
| | | const planOpen = ref(false);
|
| | | const planDetail = ref({});
|
| | | const dateRange = ref([]);
|
| | | const selectOpen = ref(false);
|
| | | const firmList = ref([]);
|
| | | const selectMonth = ref([]);
|
| | | const deptOptions = ref(undefined);
|
| | | const selectOffices = ref([]);
|
| | | const officeList = ref([]);
|
| | | let checkedList = ref([]); // 选中的企业列表
|
| | | const data = reactive({
|
| | | form: {
|
| | | enforceReason: "", // 计划名称
|
| | | applyOrgId: "", // 制定机构id
|
| | | applyOrgName: "", // 制定机构
|
| | | applyDeptIds: "", // 执行科室
|
| | | applyDeptNames: "", // 执行科室名称
|
| | | companyName: "", // 被检查对象
|
| | | companyId: "", // 被检查对象id
|
| | | companyCode: "", // 统一社会信用代码
|
| | | industry: "", // 所属行业
|
| | | enforceType: "", // 检查方式
|
| | | enforceContent: "", // 检查内容
|
| | | planFrequency: "", // 计划频次
|
| | | planFrequencyUnit: 119, // 计划频次单位
|
| | | planMonth: "", // 计划月份
|
| | | },
|
| | | queryParams: {
|
| | | orderType: 1,
|
| | | companyName: "",
|
| | | enforceReason: "",
|
| | | applyOrgId: "",
|
| | | planMonthStart: "", // 计划开始月份
|
| | | planMonthEnd: "", // 计划结束月份
|
| | | pageNum: 1,
|
| | | pageSize: 10,
|
| | | total: 1,
|
| | | },
|
| | | rules: {
|
| | | orderNo: [{ required: true, message: "计划编号不能为空", trigger: "blur" }],
|
| | | enforceReason: [
|
| | | { required: true, message: "计划名称不能为空", trigger: "blur" },
|
| | | ],
|
| | | applyOrgId: [
|
| | | { required: true, message: "制定计划的机构不能为空", trigger: "blur" },
|
| | | ],
|
| | | checkdIds: [
|
| | | { required: true, message: "被检查对象不能为空", trigger: "blur" },
|
| | | ],
|
| | | companyName: [
|
| | | { required: true, message: "企业名称不能为空", trigger: "blur" },
|
| | | ],
|
| | | companyCode: [
|
| | | { required: true, message: "统一社会信用代码不能为空", trigger: "blur" },
|
| | | ],
|
| | | industry: [
|
| | | { required: true, message: "所属行业不能为空", trigger: "blur" },
|
| | | ],
|
| | | enforceContent: [
|
| | | { required: true, message: "检查内容不能为空", trigger: "blur" },
|
| | | ],
|
| | | applyDeptIds: [
|
| | | { required: true, message: "执行科室不能为空", trigger: "blur" },
|
| | | ],
|
| | | planFrequency: [
|
| | | { required: true, message: "计划频次不能为空", trigger: "blur" },
|
| | | ],
|
| | | planMonth: [
|
| | | { required: true, message: "计划月份不能为空", trigger: "blur" },
|
| | | ],
|
| | | enforceType: [
|
| | | { required: true, message: "检查方式不能为空", trigger: "blur" },
|
| | | ],
|
| | | checkStatus: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
| | | },
|
| | | firmQueryParams: {
|
| | | pageNum: 1,
|
| | | pageSize: 10,
|
| | | total: 1,
|
| | | companyName: "",
|
| | | companyCode: "",
|
| | | },
|
| | | });
|
| | |
|
| | | // 获取科室列表
|
| | | const getOfficeList = () => {
|
| | | listDept({
|
| | | pageNum: 1,
|
| | | pageSize: 1000,
|
| | | parentId: form.value.applyOrgId,
|
| | | }).then((response) => {
|
| | | officeList.value = response.data;
|
| | | });
|
| | | };
|
| | |
|
| | | // 月份选择
|
| | | const changeDateHandler = (value) => {
|
| | | data.queryParams.planMonth = value.join(",");
|
| | | };
|
| | |
|
| | | // 计划月份选择
|
| | | const changeMonth = (value) => {
|
| | | form.value.planMonth = value.join(",");
|
| | | };
|
| | |
|
| | | // 机构选择
|
| | | const changeTreeHandler = (e) => {
|
| | | form.value.applyOrgId = e.id;
|
| | | form.value.applyOrgName = e.label;
|
| | | selectOffices.value = [];
|
| | | form.value.applyDeptIds = "";
|
| | | form.value.applyDeptNames = "";
|
| | | if (e.id) {
|
| | | getOfficeList();
|
| | | }
|
| | | };
|
| | |
|
| | | // 科室选择
|
| | | const handleSelectOffices = (value) => {
|
| | | form.value.applyDeptNames = value
|
| | | .map((item) => {
|
| | | return officeList.value.find((obj) => obj.deptId === item).deptName;
|
| | | })
|
| | | .join(",");
|
| | | form.value.applyDeptIds = value.join(",");
|
| | | };
|
| | |
|
| | | /*** 计划导入参数 */
|
| | | const upload = reactive({
|
| | | // 是否显示弹出层(用户导入)
|
| | | open: false,
|
| | | // 弹出层标题(用户导入)
|
| | | title: "",
|
| | | // 是否禁用上传
|
| | | isUploading: false,
|
| | | // 是否更新已经存在的用户数据
|
| | | updateSupport: 0,
|
| | | // 设置上传的请求头部
|
| | | headers: { Authorization: "Bearer " + getToken() },
|
| | | // 上传的地址
|
| | | url: import.meta.env.VITE_APP_BASE_API + "/enforce/order/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, firmQueryParams } = toRefs(data);
|
| | |
|
| | | /** 查询部门下拉树结构 */
|
| | | function getDeptTree() {
|
| | | deptTreeSelect().then((response) => {
|
| | | deptOptions.value = response.data.map((obj) => {
|
| | | obj.children = obj.children.map((child) => {
|
| | | delete child.children;
|
| | | return child;
|
| | | });
|
| | | return obj;
|
| | | });
|
| | | });
|
| | | }
|
| | | getDeptTree();
|
| | | /** 查询计划列表 */
|
| | | 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 = {
|
| | | enforceReason: "", // 计划名称
|
| | | applyOrgId: "", // 制定机构id
|
| | | applyOrgName: "", // 制定机构
|
| | | applyDeptIds: "", // 执行科室id
|
| | | applyDeptNames: "", // 执行科室名称
|
| | | checkdIds: "", // 被检查对象id
|
| | | companyName: "", // 被检查对象名称
|
| | | companyCode: "", // 统一社会信用代码
|
| | | enforceType: "", // 检查方式
|
| | | industry: "", // 所属行业
|
| | | enforceContent: "", // 检查内容
|
| | | planFrequency: "", // 计划频次
|
| | | planFrequencyUnit: "1", // 计划频次单位
|
| | | planMonth: "", // 计划月份
|
| | | orderType: 1,
|
| | | };
|
| | | selectOffices.value = [];
|
| | | selectMonth.value = [];
|
| | | checkedList.value = [];
|
| | | proxy.$refs["deptRef"].clearValidate();
|
| | | proxy.$refs["deptRef"].resetFields();
|
| | | }
|
| | |
|
| | | function closeUpdHandler() {
|
| | | reset();
|
| | | open.value = false;
|
| | | }
|
| | |
|
| | | const queryRef = ref();
|
| | | /** 搜索按钮操作 */
|
| | | function handleQuery() {
|
| | | getList();
|
| | | }
|
| | | /** 重置按钮操作 */
|
| | | function resetQuery() {
|
| | | queryRef.value.resetFields();
|
| | | dateRange.value = [];
|
| | | queryParams.value = {
|
| | | orderType: 1,
|
| | | companyName: "",
|
| | | enforceReason: "",
|
| | | applyOrgId: "",
|
| | | planMonthStart: "", // 计划开始月份
|
| | | planMonthEnd: "", // 计划结束月份
|
| | | pageNum: 1,
|
| | | pageSize: 10,
|
| | | total: 1,
|
| | | };
|
| | | handleQuery();
|
| | | }
|
| | | function getDetails(id) {
|
| | | getManage(id).then((response) => {
|
| | | form.value = JSON.parse(JSON.stringify(response.data));
|
| | | form.value.planFrequencyUnit = form.value.planFrequencyUnit.toString();
|
| | | form.value.enforceType = Number(form.value.enforceType);
|
| | | selectMonth.value = form.value.planMonth.split(",");
|
| | | selectOffices.value = form.value.applyDeptIds
|
| | | .split(",")
|
| | | .map((item) => Number(item));
|
| | |
|
| | | getOfficeList();
|
| | | open.value = true;
|
| | | });
|
| | | }
|
| | |
|
| | | /** 详细按钮操作 */
|
| | | function handleView(row) {
|
| | | planOpen.value = true;
|
| | | planDetail.value = row;
|
| | | planOpen.value = true;
|
| | | }
|
| | |
|
| | | /** 新增按钮操作 */
|
| | | function handleAdd(row) {
|
| | | if (row) {
|
| | | title.value = "编辑计划";
|
| | | getDetails(row.orderId);
|
| | | } else {
|
| | | title.value = "添加计划";
|
| | | open.value = true;
|
| | | getUserOrgId();
|
| | | }
|
| | | getFirmList();
|
| | | }
|
| | |
|
| | | /** 提交按钮 */
|
| | | function submitForm() {
|
| | | proxy.$refs["deptRef"].validate((valid) => {
|
| | | if (valid) {
|
| | | if (form.value.orderId != undefined) {
|
| | | updateManage(form.value).then((response) => {
|
| | | proxy.$modal.msgSuccess("修改成功");
|
| | | open.value = false;
|
| | | getList();
|
| | | reset();
|
| | | });
|
| | | } else {
|
| | | const submitArr = checkedList.value.map((item, index) => {
|
| | | const submitForm = { ...form.value };
|
| | | submitForm.companyId = item.companyId;
|
| | | submitForm.companyName = item.companyName;
|
| | | submitForm.companyCode = item.companyCode;
|
| | | return submitForm
|
| | | });
|
| | | addManage(submitArr).then((response) => {
|
| | | proxy.$modal.msgSuccess("新增成功");
|
| | | open.value = false;
|
| | | getList();
|
| | | reset();
|
| | | });
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | /** 删除按钮操作 */
|
| | | function handleDelete(row) {
|
| | | proxy.$modal
|
| | | .confirm("是否确认删除该数据?")
|
| | | .then(function () {
|
| | | return delManage(row.orderId);
|
| | | })
|
| | | .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 downLoadCode() {
|
| | | exportManage().then((val) => {
|
| | | downloadHttp(
|
| | | "/tool/file/download",
|
| | | {
|
| | | fileName: val.msg,
|
| | | delete: true,
|
| | | },
|
| | | "计划信息.xlsx"
|
| | | );
|
| | | });
|
| | | }
|
| | |
|
| | | function openFirmSelect() {
|
| | | selectOpen.value = true;
|
| | | }
|
| | |
|
| | | /** 查询企业列表 */
|
| | | function getFirmList() {
|
| | | listCompany(firmQueryParams.value).then((response) => {
|
| | | firmList.value = response.rows;
|
| | | firmQueryParams.value.total = response.total;
|
| | | });
|
| | | }
|
| | |
|
| | | function handleSelectionChange(e) {
|
| | | checkedList.value = e;
|
| | | form.value.checkdIds = e.map((item) => item.companyId).join(",");
|
| | | }
|
| | |
|
| | | function closeSelect() {
|
| | | selectOpen.value = false;
|
| | | }
|
| | |
|
| | | function industryToText(industry) {
|
| | | return industry_type.value.find((item) => item.value == industry).label;
|
| | | }
|
| | |
|
| | | function methodToText(enforceType) {
|
| | | if (!enforceType) return "";
|
| | | return enforce_type.value.find((item) => item.value == enforceType).label;
|
| | | }
|
| | |
|
| | | function frequencyToText(data) {
|
| | | console.log(data.planFrequencyUnit);
|
| | | if (!data.planFrequencyUnit) {
|
| | | return "";
|
| | | }
|
| | | const unit = frequency.value.find(
|
| | | (item) => item.value == data.planFrequencyUnit
|
| | | ).label;
|
| | | return `${data.planFrequency}次/${unit}`;
|
| | | }
|
| | |
|
| | | function statusToText(status) {
|
| | | return statusOptions.value.find((item) => item.value == status).label;
|
| | | }
|
| | |
|
| | | function getUserOrgId() {
|
| | | getOrgId().then((response) => {
|
| | | form.value.applyOrgId = Number(response.data.orgId) || "";
|
| | | form.value.applyDeptIds = response.data.deptId || "";
|
| | | if (form.value.applyDeptIds) {
|
| | | selectOffices.value = form.value.applyDeptIds
|
| | | .split(",")
|
| | | .map((item) => Number(item));
|
| | | }
|
| | | if (form.value.applyOrgId) {
|
| | | getOfficeList();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | getList();
|
| | | function selectableFun(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;
|
| | | }
|
| | | }
|
| | | }
|
| | | </style>
|