| | |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="机构名称" prop="name" align="center" /> |
| | | <el-table-column label="社会信用代码" prop="code" align="center" /> |
| | | <el-table-column label="机构属性" prop="lawSubTitle" align="center" /> |
| | | <el-table-column label="所属区域" prop="area" align="center" /> |
| | | <el-table-column label="资质证书编号" prop="institution" align="center" /> |
| | | <el-table-column label="发证日期" prop="date" align="center" /> |
| | | <el-table-column label="有效期" prop="date" align="center" /> |
| | | <el-table-column label="公示状态" prop="status" align="center" /> |
| | | <el-table-column label="社会信用代码" prop="creditCode" align="center" /> |
| | | <el-table-column label="机构属性" prop="attribute" align="center" > |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.attribute == 0">疆内</span> |
| | | <span v-if="scope.row.attribute == 1">疆外</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="所属区域" prop="province" align="center" > |
| | | <template #default="scope"> |
| | | <span >{{scope.row.province}}<span v-if="scope.row.province">/</span>{{scope.row.city}}<span v-if="scope.row.district">/</span>{{scope.row.district}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="资质证书编号" prop="certNumber" align="center" /> |
| | | <el-table-column label="发证日期" prop="issueDate" align="center" /> |
| | | <el-table-column label="有效期" prop="validDate" align="center" /> |
| | | <el-table-column label="公示状态" prop="status" align="center" > |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.publication ===0">公示</span> |
| | | <span v-if="scope.row.publication ===1">未公示</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('review',scope.row)" >查看</el-button> |
| | | <el-button link type="primary" @click="publicity(scope.row)" >{{publicMsg}}</el-button> |
| | | <el-button link type="primary" @click="openDialog(scope.row)" >查看</el-button> |
| | | <el-button link type="primary" @click="publicity(scope.row)" >{{scope.row.publicMsg}}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | v-model:page="queryParams.pageNum" |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <div class="pag-container"> |
| | | <el-pagination |
| | | v-model:current-page="data.queryParams.pageNum" |
| | | v-model:page-size="data.queryParams.pageSize" |
| | | :page-sizes="[10,15,20,25]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <institution-dialog ref="inRef" @getList="getList"></institution-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {getCurrentInstance, onMounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import institutionDialog from "./components/viewInstitution.vue" |
| | | import {changeInsitutionPublic, getInsitutionList} from "@/api/backManage/insitution"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const inRef = ref(); |
| | | const publicMsg = ref("公示"); |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | |
| | | const getList = () => { |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | const getList = async () => { |
| | | loading.value = true; |
| | | console.log("获取数据") |
| | | const res = await getInsitutionList(data.queryParams); |
| | | if(res.code === 200){ |
| | | dataList.value = res.data.list.map(item => { |
| | | return { |
| | | ...item, |
| | | publicMsg: item.publication ===0 ? '取消公示' : "公示" |
| | | } |
| | | }) |
| | | total.value = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false; |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | | inRef.value.openDialog(type, value); |
| | | const handleSizeChange = (val) => { |
| | | data.queryParams.pageSize = val |
| | | getList() |
| | | } |
| | | const handleCurrentChange = (val) => { |
| | | data.queryParams.pageNum = val |
| | | getList() |
| | | } |
| | | |
| | | const publicity = (val) => { |
| | | const openDialog = (value) => { |
| | | inRef.value.openDialog( value); |
| | | } |
| | | |
| | | const publicity = async (val) => { |
| | | const param = { |
| | | id: val.id, |
| | | publication: val.publication ===0 ? 1: 0 |
| | | } |
| | | const res = await changeInsitutionPublic(param); |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '成功' |
| | | }); |
| | | getList(); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const handleDelete = (val) => { |
| | |
| | | } |
| | | |
| | | </script> |
| | | <style lang="scss"> |
| | | .pag-container{ |
| | | float: right; |
| | | margin-top: 10px; |
| | | } |
| | | </style> |