| | |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="资质名称" prop="name"> |
| | | <el-select |
| | | v-model="queryParams.name" |
| | | placeholder="选择资质名称" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.cnas_method_qualification" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | > |
| | | <el-select v-model="queryParams.name" placeholder="选择资质名称" size="small" @change="refreshTable(), list = []"> |
| | | <el-option v-for="dict in dict.type.cnas_method_qualification" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | | {{ dict.label }} |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="refreshTable" |
| | | >查 询</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh" |
| | | >重 置</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 询</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="text-align: left"> |
| | | <el-radio-group |
| | | v-model="radio" |
| | | @input="selectorSwitch" |
| | | size="medium" |
| | | fill="#409EFF" |
| | | > |
| | | <el-radio-group v-model="radio" @input="selectorSwitch" size="medium" fill="#409EFF"> |
| | | <el-radio-button :label="0">资质明细</el-radio-button> |
| | | <el-radio-button :label="1">资质总览</el-radio-button> |
| | | </el-radio-group> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right" v-if="radio === 0"> |
| | | <el-button size="small" type="primary" @click="openAdd" |
| | | >资质更新</el-button |
| | | > |
| | | <el-button size="small" icon="el-icon-delete" @click="handleDel" |
| | | >删除</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="openAdd">资质更新</el-button> |
| | | <el-button size="small" icon="el-icon-delete" @click="handleDel">删除</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-if="radio === 0"> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | @pagination="pagination" |
| | | :height="'calc(100vh - 300px)'" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | ></lims-table> |
| | | <lims-table :tableData="tableData" :column="column" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange" @pagination="pagination" :height="'calc(100vh - 300px)'" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <div |
| | | class="table" |
| | | v-if="radio === 1" |
| | | v-loading="pageLoading" |
| | | @scroll="scrollFn" |
| | | > |
| | | <div class="table" v-if="radio === 1" v-loading="pageLoading" @scroll="scrollFn"> |
| | | <el-row :gutter="16"> |
| | | <el-col |
| | | :span="8" |
| | | v-for="(m, i) in list" |
| | | :key="i" |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="8" |
| | | :lg="8" |
| | | :xl="6" |
| | | style="margin-bottom: 16px" |
| | | > |
| | | <el-col :span="8" v-for="(m, i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="8" :xl="6" |
| | | style="margin-bottom: 16px"> |
| | | <div class="table-item"> |
| | | <el-image |
| | | style=" |
| | | <el-image style=" |
| | | width: 102px; |
| | | height: 102px; |
| | | margin-right: 20px; |
| | | border-radius: 16px; |
| | | " |
| | | :src="javaApi + '/img/' + m.imageUrl" |
| | | > |
| | | <div |
| | | slot="error" |
| | | class="image-error" |
| | | style=" |
| | | " :src="javaApi + '/img/' + m.imageUrl"> |
| | | <div slot="error" class="image-error" style=" |
| | | width: 100px; |
| | | height: 100px; |
| | | border-radius: 16px; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #eeeeee; |
| | | " |
| | | > |
| | | <i |
| | | class="el-icon-picture-outline" |
| | | style="font-size: 30px; color: #666666" |
| | | ></i> |
| | | "> |
| | | <i class="el-icon-picture-outline" style="font-size: 30px; color: #666666"></i> |
| | | </div> |
| | | </el-image> |
| | | <div |
| | | class="table-item-right" |
| | | style="flex: 1; font-size: 12px; color: #666666" |
| | | > |
| | | <div class="table-item-right" style="flex: 1; font-size: 12px; color: #666666"> |
| | | <p style="line-height: 26px"> |
| | | 资质名称:<span style="color: #3a7bfa">{{ m.name }}</span> |
| | | </p> |
| | |
| | | <p style="line-height: 26px">到期时间:{{ m.expireTime }}</p> |
| | | <p> |
| | | <span>状态:</span> |
| | | <el-tag |
| | | :type="m.state === 0 ? 'danger' : 'success'" |
| | | size="small" |
| | | >{{ m.state === 0 ? "失效" : "有效" }}</el-tag |
| | | > |
| | | <el-tag :type="m.state === 0 ? 'danger' : 'success'" size="small">{{ m.state === 0 ? "失效" : "有效" |
| | | }}</el-tag> |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div |
| | | v-if="list.length < 1 && !pageLoading && !isLoding" |
| | | style=" |
| | | <div v-if="list.length < 1 && !pageLoading && !isLoding" style=" |
| | | color: #909399; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | margin-top: 200px; |
| | | " |
| | | > |
| | | "> |
| | | 暂无数据 |
| | | </div> |
| | | <div v-if="list.length > 0"> |
| | | <el-button |
| | | v-if="isLoding" |
| | | type="text" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | > |
| | | <el-button v-if="isLoding" type="text" style="display: flex; margin: 0 auto; color: #909399"> |
| | | <i class="el-icon-loading" style="font-size: 20px"></i> |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | v-if="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | >已经没有更多啦~</el-button |
| | | > |
| | | <el-button type="text" v-if="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399">已经没有更多啦~</el-button> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="资质更新" |
| | | :visible.sync="qualificationsConnectVisible" |
| | | width="400px" |
| | | > |
| | | <el-form |
| | | ref="formDataRef" |
| | | :model="formData" |
| | | label-position="right" |
| | | :rules="formDataRules" |
| | | label-width="78px" |
| | | > |
| | | <el-dialog title="资质更新" :visible.sync="qualificationsConnectVisible" width="400px"> |
| | | <el-form ref="formDataRef" :model="formData" label-position="right" :rules="formDataRules" label-width="78px"> |
| | | <el-form-item label="资质名称" prop="name"> |
| | | <el-select |
| | | v-model="formData.name" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | size="small" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.cnas_method_qualification" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | > |
| | | <el-select v-model="formData.name" placeholder="请选择" style="width: 100%" size="small" clearable> |
| | | <el-option v-for="dict in dict.type.cnas_method_qualification" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | | {{ dict.label }} |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="资质编码" prop="code"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请输入" |
| | | clearable |
| | | v-model="formData.code" |
| | | ></el-input> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="formData.code"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="颁发机构" prop="organization"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请输入" |
| | | clearable |
| | | v-model="formData.organization" |
| | | ></el-input> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="formData.organization"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="资质说明" prop="explanation"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请输入" |
| | | clearable |
| | | v-model="formData.explanation" |
| | | ></el-input> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="formData.explanation"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="颁发时间" prop="dateOfIssuance"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="formData.dateOfIssuance" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="选择日期" |
| | | > |
| | | <el-date-picker style="width: 100%" v-model="formData.dateOfIssuance" type="datetime" size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" clearable placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="到期时间" prop="expireTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="formData.expireTime" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="选择日期" |
| | | > |
| | | <el-date-picker style="width: 100%" v-model="formData.expireTime" type="datetime" size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" clearable placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="资质图片"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="uploadAction" |
| | | :on-success="(m) => handleSuccessUpImg(m, 'imageUrl')" |
| | | accept="image/jpg,image/jpeg,image/png" |
| | | :multiple="false" |
| | | :limit="1" |
| | | :headers="headers" |
| | | :on-change="beforeUpload" |
| | | :on-error="onError" |
| | | > |
| | | <el-button slot="trigger" size="small" type="primary" |
| | | >选取图片</el-button |
| | | > |
| | | <el-upload ref="upload" :action="uploadAction" :on-success="(m) => handleSuccessUpImg(m, 'imageUrl')" |
| | | accept="image/jpg,image/jpeg,image/png" :multiple="false" :limit="1" :headers="headers" |
| | | :on-change="beforeUpload" :on-error="onError"> |
| | | <el-button slot="trigger" size="small" type="primary">选取图片</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="资质附件"> |
| | | <el-upload |
| | | ref="upload1" |
| | | :action="uploadAction" |
| | | :on-success="(m) => handleSuccessUpImg(m, 'fileUrl')" |
| | | accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx" |
| | | :headers="headers" |
| | | :multiple="false" |
| | | :limit="1" |
| | | :on-change="beforeUpload1" |
| | | :on-error="onError1" |
| | | > |
| | | <el-button slot="trigger" size="small" type="primary" |
| | | >选取文件</el-button |
| | | > |
| | | <el-upload ref="upload1" :action="uploadAction" :on-success="(m) => handleSuccessUpImg(m, 'fileUrl')" |
| | | accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx" :headers="headers" :multiple="false" |
| | | :limit="1" :on-change="beforeUpload1" :on-error="onError1"> |
| | | <el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="qualificationsConnectVisible = false" |
| | | >取 消</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | @click="confirmQualifications" |
| | | :loading="loading" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="qualificationsConnectVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmQualifications" :loading="loading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: 'Laboratory', |
| | | components: { |
| | | limsTable, |
| | | }, |
| | |
| | | this.selection.forEach((item) => { |
| | | delIds.push(item.id); |
| | | }); |
| | | delCertificationDetail(delIds).then((res) => { |
| | | delCertificationDetail({ ids: delIds.join(',') }).then((res) => { |
| | | if (res.code !== 200) return; |
| | | this.refreshTable(); |
| | | this.$message.success("删除成功"); |
| | |
| | | }, |
| | | // 资质明细附件下载 |
| | | handleDownLoad(row) { |
| | | // let url = row.fileUrl; |
| | | // const link = document.createElement('a'); |
| | | // link.href = this.javaApi + '/img/'+ url; |
| | | // document.body.appendChild(link); |
| | | // link.target = '_blank'; |
| | | // link.click(); |
| | | const url = process.env.VUE_APP_BASE_API + "/img/" + row.fileUrl; |
| | | this.$download.saveAs(url, row.fileUrl); |
| | | if (!row.fileUrl) { |
| | | this.$message.warning('暂无附件') |
| | | return; |
| | | } |
| | | this.$download.saveAs(row.fileUrl, row.fileUrl); |
| | | }, |
| | | openAdd() { |
| | | this.qualificationsConnectVisible = true; |
| | |
| | | addCertificationDetail({ ...this.formData }) |
| | | .then((res) => { |
| | | this.loading = false; |
| | | if (res.code === 201) return; |
| | | this.$message.success("已提交"); |
| | | this.refreshTable(); |
| | | this.resetForm("formDataRef"); |
| | |
| | | line-height: 40px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .table-item { |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51, 51, 51, 0.04); |