New file |
| | |
| | | <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="bm"> |
| | | <el-input |
| | | v-model="queryParams.bm" |
| | | placeholder="请输入编码" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> --> |
| | | <el-form-item label="科室" prop="ks"> |
| | | <el-input |
| | | v-model="queryParams.ks" |
| | | placeholder="请输入科室" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="检查项目" prop="jcxm"> |
| | | <el-input |
| | | v-model="queryParams.jcxm" |
| | | placeholder="请输入检查项目" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="主要诊断" prop="zyzd"> |
| | | <el-input |
| | | v-model="queryParams.zyzd" |
| | | placeholder="请输入主要诊断" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </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="['hosp:advicerules: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="['hosp:advicerules: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="['hosp:advicerules:remove']" |
| | | >删除 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleImport" |
| | | >导入 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['hosp:advicerules:export']" |
| | | >导出 |
| | | </el-button> |
| | | </el-col> |
| | | <right-toolbar |
| | | :showSearch.sync="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="advicerulesList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="序号" width="50" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.$index + 1 }} |
| | | <!-- 使用 $index 来显示序号,从1开始 --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="编码" align="center" prop="bm" /> |
| | | <el-table-column label="科室" align="center" prop="ks" /> |
| | | <el-table-column label="检查项目" align="center" prop="jcxm" /> |
| | | <el-table-column |
| | | label="主要诊断" |
| | | align="center" |
| | | :show-overflow-tooltip="true" |
| | | width="120" |
| | | prop="zyzd" |
| | | /> |
| | | <el-table-column |
| | | label="建议名称" |
| | | align="center" |
| | | :show-overflow-tooltip="true" |
| | | width="150" |
| | | prop="jymc" |
| | | /> |
| | | <el-table-column |
| | | label="建议内容" |
| | | align="center" |
| | | :show-overflow-tooltip="true" |
| | | width="200" |
| | | prop="jynr" |
| | | /> |
| | | <el-table-column label="范围" align="center" prop="fwz" /> |
| | | <el-table-column label="范围最小值" align="center" prop="fwzxz" /> |
| | | <el-table-column label="范围最大值" align="center" prop="fwzdz" /> |
| | | <el-table-column label="异常标志" align="center" prop="ycbz" /> |
| | | <el-table-column label="是否疾病" align="center" prop="sfjb"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.sfjb" /> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column label="是否常见病" align="center" prop="sfcjb"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.sfcjb" /> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column label="是否慢性病" align="center" prop="sfmxb"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.sfmxb" /> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="是否重大疾病" |
| | | align="center" |
| | | width="120" |
| | | prop="sfzdjb" |
| | | > |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.sfzdjb" /> |
| | | </template> --> |
| | | </el-table-column> |
| | | <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="['hosp:advicerules:edit']" |
| | | > |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['hosp:advicerules: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" |
| | | width="1000px" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | :inline="true" |
| | | > |
| | | <el-form-item label="科室" prop="ks"> |
| | | <el-select |
| | | v-model="form.ks" |
| | | placeholder="请选择科室" |
| | | style="width: 200" |
| | | > |
| | | <el-option |
| | | v-for="item in departmentOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检查项目" prop="jcxm"> |
| | | <el-input |
| | | v-model="form.jcxm" |
| | | placeholder="请输入检查项目" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="主要诊断" prop="zyzd"> |
| | | <el-input |
| | | v-model="form.zyzd" |
| | | placeholder="请输入主要诊断" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="范围" prop="fw"> |
| | | <el-input |
| | | v-model="form.fw" |
| | | placeholder="请输入范围" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="最小值" prop="fwzxz"> |
| | | <el-input |
| | | v-model="form.fwzxz" |
| | | style="width: 200px" |
| | | placeholder="请输入范围最小值" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="最大值" prop="fwzdz"> |
| | | <el-input |
| | | v-model="form.fwzdz" |
| | | style="width: 200px" |
| | | placeholder="请输入范围最大值" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="异常标志" prop="ycbz"> |
| | | <el-input |
| | | v-model="form.ycbz" |
| | | style="width: 200px" |
| | | placeholder="请输入异常标志" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="疾病" prop="sfjb"> |
| | | <el-checkbox v-model="form.sfjb" true-label="是" false-label="否"> |
| | | </el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item label="常见病" prop="sfcjb"> |
| | | <el-checkbox |
| | | v-model="form.sfcjb" |
| | | true-label="是" |
| | | false-label="否" |
| | | ></el-checkbox> |
| | | <!-- <el-input |
| | | v-model="form.sfcjb" |
| | | style="width: 200px" |
| | | placeholder="请输入是否常见病" |
| | | /> --> |
| | | </el-form-item> |
| | | <el-form-item label="慢性病" prop="sfmxb"> |
| | | <el-checkbox |
| | | v-model="form.sfmxb" |
| | | true-label="是" |
| | | false-label="否" |
| | | ></el-checkbox> |
| | | <!-- <el-input |
| | | v-model="form.sfmxb" |
| | | style="width: 200px" |
| | | placeholder="请输入是否慢性病" |
| | | /> --> |
| | | </el-form-item> |
| | | <el-form-item label="重大疾病" prop="sfzdjb"> |
| | | <el-checkbox |
| | | v-model="form.sfzdjb" |
| | | true-label="是" |
| | | false-label="否" |
| | | ></el-checkbox> |
| | | <!-- <el-input |
| | | v-model="form.sfzdjb" |
| | | style="width: 200px" |
| | | placeholder="请输入是否重大疾病" |
| | | /> --> |
| | | </el-form-item> |
| | | <el-form-item label="建议名称" prop="jymc" style="display: block"> |
| | | <el-input |
| | | v-model="form.jymc" |
| | | placeholder="请输入建议名称" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="建议内容" prop="jynr"> |
| | | <span |
| | | slot="label" |
| | | style="display: inline-block; border-bottom: 2px solid blue" |
| | | @click="getDetailed" |
| | | > |
| | | 建议内容 |
| | | </span> |
| | | |
| | | <el-input |
| | | v-if="key !== 'N'" |
| | | style="width: 782px" |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.jynr" |
| | | placeholder="请输入建议内容" |
| | | > |
| | | </el-input> |
| | | </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> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | :title="upload.title" |
| | | :visible.sync="upload.open" |
| | | width="400px" |
| | | append-to-body |
| | | > |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :data="data" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="false" |
| | | drag |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__tip text-center" slot="tip"> |
| | | <div class="el-upload__tip" slot="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> |
| | | </el-upload> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">保存信息</el-button> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 建议内容及建议名称弹框 --> |
| | | <el-dialog |
| | | title="建议内容" |
| | | :visible.sync="dialogTableVisible" |
| | | width="80%" |
| | | :close-on-click-modal="false" |
| | | @close="clearForm" |
| | | > |
| | | <div class="app-container"> |
| | | <el-form |
| | | :model="form" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="标题" prop="title"> |
| | | <el-input |
| | | v-model="queryParam1.bt" |
| | | placeholder="请输入标题" |
| | | clearable |
| | | @keyup.enter.native="handlecharge" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="建议内容" prop="jynr"> |
| | | <el-input |
| | | v-model="queryParam1.nr" |
| | | placeholder="请输入建议" |
| | | clearable |
| | | @keyup.enter.native="handlecharge" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handlecharge" |
| | | >搜索</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="adviceList" |
| | | ref="tb" |
| | | @selection-change="handleSelectionChange1" |
| | | border |
| | | > |
| | | <el-table-column type="selection" align="center" fixed /> |
| | | <el-table-column |
| | | label="序号" |
| | | align="center" |
| | | width="60" |
| | | prop="newID" |
| | | /> |
| | | <el-table-column |
| | | label="标题" |
| | | align="center" |
| | | prop="title" |
| | | width="120" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="建议" |
| | | align="center" |
| | | prop="advice" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | </el-table> |
| | | |
| | | <div class="pag"> |
| | | <div class="pag1"> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="queryParam1.page" |
| | | :limit.sync="queryParam1.pageSize" |
| | | @pagination="getlistJynr" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogTableVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submit">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | listAdvicerules, |
| | | getAdvicerules, |
| | | delAdvicerules, |
| | | addAdvicerules, |
| | | updateAdvicerules, |
| | | } from "@/api/hosp/advicerules"; |
| | | import { listAdvice } from "@/api/advice/advice"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { deptTreeSelect } from "@/api/system/dept"; |
| | | |
| | | export default { |
| | | name: "Advicerules", |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | dialogTableVisible: false, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 体检项目建议规则新表表格数据 |
| | | advicerulesList: [], |
| | | adviceList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | key: "", |
| | | moduleName: "exampleModule", // 示例模块名 |
| | | businessName: "exampleBusiness", // 示例业务名 |
| | | objs: {}, |
| | | departmentOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | bm: null, |
| | | ks: null, |
| | | jcxm: null, |
| | | zyzd: null, |
| | | jymc: null, |
| | | jynr: null, |
| | | sfjb: null, |
| | | sfcjb: null, |
| | | sfmxb: null, |
| | | sfzdjb: null, |
| | | }, |
| | | queryParam1: { |
| | | page: 1, |
| | | pageSize: 10, |
| | | bt: "", // 标题 |
| | | nr: "", // 建议内容 |
| | | }, |
| | | querycharge: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: {}, |
| | | upload: { |
| | | // 是否显示弹出层(用户导入) |
| | | open: false, |
| | | // 弹出层标题(用户导入) |
| | | title: "", |
| | | // 是否禁用上传 |
| | | isUploading: false, |
| | | // 是否更新已经存在的用户数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: process.env.VUE_APP_BASE_API + "/hosp/advicerules/tjimport", |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询体检项目建议规则新表列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listAdvicerules(this.queryParams).then((response) => { |
| | | this.advicerulesList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | deptTreeSelect().then((response) => { |
| | | this.departmentOptions = response.data[0].children; |
| | | console.log(response, 999); |
| | | }); |
| | | }, |
| | | /* getDeptTree() { |
| | | deptTreeSelect().then((response) => { |
| | | this.deptOption = response.data; |
| | | }); |
| | | }, */ |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | bm: null, |
| | | ks: null, |
| | | jcxm: null, |
| | | zyzd: null, |
| | | jymc: null, |
| | | jynr: null, |
| | | fwz: null, |
| | | fwzxz: null, |
| | | fwzdz: null, |
| | | ycbz: null, |
| | | sfjb: null, |
| | | sfcjb: null, |
| | | sfmxb: null, |
| | | sfzdjb: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | createBy: null, |
| | | updateBy: null, |
| | | deleted: null, |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | handlecharge() { |
| | | this.querycharge.pageNum = 1; |
| | | this.getlistJynr(); |
| | | }, |
| | | clearForm() { |
| | | this.queryParam.bt = ""; // 清空标题 |
| | | this.queryParam.nr = ""; // 清空建议内容 |
| | | }, |
| | | |
| | | handleSelectionChange1(selection) { |
| | | this.ChangeList = selection; |
| | | this.ids = selection.map((item) => item.aid); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | if (selection.length > 1) { |
| | | let del_row = selection.shift(); |
| | | this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | } |
| | | }, |
| | | |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | getDetailed() { |
| | | this.getlistJynr(); |
| | | this.dialogTableVisible = true; |
| | | this.key != "N"; |
| | | }, |
| | | /* 获取建议内容 */ |
| | | getlistJynr() { |
| | | this.loading = true; |
| | | // this.List = true; |
| | | listAdvice(this.queryParam1).then((response) => { |
| | | response.data.list.forEach((item, index) => { |
| | | item.newID = |
| | | (this.queryParam1.page - 1) * this.queryParam1.pageSize + index + 1; |
| | | }); |
| | | |
| | | this.adviceList = response.data.list; |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | /* 弹框确定按钮 */ |
| | | submit() { |
| | | console.log(this.ChangeList, 123); |
| | | |
| | | this.ChangeList.forEach((item) => { |
| | | console.log(item.title, 6363); |
| | | this.form.jymc = item.title; |
| | | console.log(this.form.adviceBt, 2525); |
| | | |
| | | this.form.jynr = item.advice; |
| | | // this.sfxmId = parseInt(item.id); |
| | | }); |
| | | this.dialogTableVisible = false; |
| | | this.key = ""; |
| | | }, |
| | | |
| | | // 多选框选中数据 |
| | | 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; |
| | | getAdvicerules(id).then((response) => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改体检项目建议规则新表"; |
| | | }); |
| | | }, |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | this.columns.forEach((column) => { |
| | | if (column.htmlType === "checkbox") { |
| | | // 将选中的 checkbox 值用逗号分隔 |
| | | this.form[column.javaField] = |
| | | this.form[column.javaField].join(","); |
| | | } |
| | | }); |
| | | if (this.table.sub) { |
| | | this.form.subclassNameList = this.subclassNameList; // 假设 subclassNameList 是子表格的数据 |
| | | } |
| | | if (this.form[pkColumn.javaField] != null) { |
| | | updateAdvicerules(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); // 刷新列表 |
| | | }); |
| | | } else { |
| | | // 如果主键字段为空,进行新增操作 |
| | | addAdvicerules(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); // 刷新列表 |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | const pkValue = row[pkColumn.javaField] || this.ids; // 获取主键值,如果row中没有主键值,则使用this.ids |
| | | this.$modal |
| | | .confirm(`是否确认删除${functionName}编号为"${pkValue}"的数据项?`) |
| | | .then(() => { |
| | | return delAdvicerules(pkValue); // 调用删除接口,传入主键值 |
| | | }) |
| | | .then(() => { |
| | | this.getList(); // 删除成功后刷新列表 |
| | | this.$modal.msgSuccess("删除成功"); // 显示删除成功的提示 |
| | | }) |
| | | .catch(() => { |
| | | // 异常处理 |
| | | }); |
| | | }, |
| | | handleImport() { |
| | | this.upload.title = "用户导入"; |
| | | this.upload.open = true; |
| | | }, |
| | | // 文件上传中处理 |
| | | handleFileUploadProgress(event, file, fileList) { |
| | | this.upload.isUploading = true; |
| | | }, |
| | | |
| | | // 文件上传成功处理 |
| | | handleFileSuccess(response, file, fileList) { |
| | | console.log(response, 666666); |
| | | if (response.code == 500) { |
| | | console.log(22222222222); |
| | | const errorList = response.data.list.join(", "); |
| | | this.$confirm(`${errorList}`, "以下人员信息有误,请核对后导入:", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "error", |
| | | center: true, |
| | | dangerouslyUseHTMLString: true, |
| | | }); |
| | | } |
| | | /* this.ListObj = response.data; |
| | | this.advicerulesList = response.data.list; |
| | | |
| | | this.userList.forEach((item) => { |
| | | this.CompanyList.forEach((item1) => { |
| | | if (item1.drugManufacturerId == this.objs.drugManufacturerId) { |
| | | item.company = item1.cnName; |
| | | } |
| | | }); |
| | | }); */ |
| | | this.upload.open = false; |
| | | this.upload.isUploading = false; |
| | | this.$refs.upload.clearFiles(); |
| | | this.leftList = response.msg; |
| | | console.log(response.code); |
| | | |
| | | /* if (this.leftList == "操作失败") { |
| | | this.isdisabled = true; |
| | | this.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg + |
| | | "<div style='br;margin:10px'>" + |
| | | response.data[0] + |
| | | "身份证或手机号码有误" + |
| | | "</div>", |
| | | "导入结果", |
| | | { dangerouslyUseHTMLString: true } |
| | | ); |
| | | } else { |
| | | this.isdisabled = false; |
| | | this.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg, |
| | | { dangerouslyUseHTMLString: true } |
| | | ); |
| | | this.rightList = response; |
| | | } */ |
| | | for (let i = 0; i < fileList.length; i++) { |
| | | if (file.name != fileList[i].name) { |
| | | this.fileList.push({ |
| | | name: file.name, |
| | | url: "", |
| | | uid: file.uid, |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // 提交上传文件 |
| | | submitFileForm() { |
| | | this.$refs.upload.submit(); |
| | | this.isShow = false; |
| | | this.getList(); |
| | | }, |
| | | |
| | | handleExport() { |
| | | this.download( |
| | | "hosp/advicerules/export", |
| | | { |
| | | ...this.queryParams, |
| | | }, |
| | | `banner_${new Date().getTime()}.xlsx` |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |