阀值样式调整

This commit is contained in:
Li xia 2024-09-03 16:46:34 +08:00
parent 9f1286c8b6
commit 48b6b907fc
1 changed files with 53 additions and 45 deletions

View File

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-row :gutter="2">
<el-col :span="6">
<el-card>
<el-col :span="8">
<el-card style=" height:750px">
<div slot="header">
<span>阀值来源信息</span>
<el-button
@ -20,10 +20,10 @@
stripe
fit
highlight-current-row
max-height="637"
max-height="760"
@row-click="sourceRowClick"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50" :index="hindex1" />
<el-table-column align="center" label="来源名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
@ -33,30 +33,30 @@
<el-table-column align="center" label="发表年份">
<template slot-scope="scope">{{ scope.row.publish_year }}</template>
</el-table-column>
<el-table-column align="center" label="操作">
<el-table-column align="center" label="操作" width="120">
<template slot-scope="scope">
<el-button
type="primary"
size="small"
icon="el-icon-edit"
size="mini"
:disabled="!checkPermission(['source_update'])"
@click="handleEdit(scope)"
/>
>编辑
</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
size="mini"
:disabled="!checkPermission(['source_delete'])"
@click="handleDelete(scope)"
/>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
v-show="sourceData.count>0"
:total="sourceData.count"
:page.sync="listQuery1.page"
:limit.sync="listQuery1.limit"
@pagination="getList"
/>
<el-dialog :visible.sync="dialogVisible" :title="dialogType==='edit'?'编辑阀值来源信息':'新增阀值来源信息'">
@ -87,8 +87,8 @@
</el-dialog>
</el-card>
</el-col>
<el-col :span="18">
<el-card>
<el-col :span="16">
<el-card style="height:750px">
<div slot="header">
<span>阀值信息</span>
<el-button
@ -108,62 +108,60 @@
highlight-current-row
max-height="600"
>
<el-table-column type="index" :index="hindex" width="50" />
<el-table-column align="center" label="阀值来源" show-overflow-tooltip>
<el-table-column type="index" :index="hindex" fixed="left" width="50" />
<el-table-column align="center" width="100" label="阀值来源" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.source_.name }}</template>
</el-table-column>
<el-table-column align="center" label="化合物分类" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.compound_cate }}</template>
</el-table-column>
<el-table-column align="center" label="气味类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.odor_type }}</template>
</el-table-column>
<el-table-column align="center" label="阈值类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.threshold_type }}</template>
</el-table-column>
<el-table-column align="center" label="毒性类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.toxicity_type }}</template>
</el-table-column>
<el-table-column align="center" label="中文名" show-overflow-tooltip>
<el-table-column align="center" width="120" fixed="left" label="中文名" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.chinese_name }}</template>
</el-table-column>
<el-table-column align="center" label="ppm" show-overflow-tooltip>
<el-table-column align="center" width="120" fixed="left" label="化合物分类" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.compound_cate }}</template>
</el-table-column>
<el-table-column align="center" width="120" label="气味类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.odor_type }}</template>
</el-table-column>
<el-table-column align="center" width="120" label="阈值类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.threshold_type }}</template>
</el-table-column>
<el-table-column align="center" width="120" label="毒性类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.toxicity_type }}</template>
</el-table-column>
<el-table-column align="center" width="120" label="ppm" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.ppm }}</template>
</el-table-column>
<el-table-column align="center" label="ppm符号标记" show-overflow-tooltip>
<el-table-column align="center" width="120" label="ppm符号标记" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.ppm_sign }}</template>
</el-table-column>
<el-table-column align="center" label="质量浓度" show-overflow-tooltip>
<el-table-column align="center" width="120" label="质量浓度" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.mass }}</template>
</el-table-column>
<el-table-column align="center" label="毒性" show-overflow-tooltip>
<el-table-column align="center" width="120" label="毒性" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.toxicity }}</template>
</el-table-column>
<el-table-column align="center" label="质量浓度符号标记" show-overflow-tooltip>
<el-table-column align="center" width="120" label="质量浓度符号标记" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.mass_sign }}</template>
</el-table-column>
<el-table-column align="center" label="分子质量" show-overflow-tooltip>
<el-table-column align="center" width="120" label="分子质量" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.molecular }}</template>
</el-table-column>
<el-table-column align="center" label="cas号" show-overflow-tooltip>
<el-table-column align="center" width="120" label="cas号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.cas }}</template>
</el-table-column>
<el-table-column align="center" label="操作">
<el-table-column align="center" fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button
type="primary"
size="small"
icon="el-icon-edit"
:disabled="!checkPermission(['threshold_update'])"
@click="ThresholdEdit(scope)"
/>
>编辑</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
:disabled="!checkPermission(['threshold_delete'])"
@click="DeleteThreshold(scope)"
/>
>删除</el-button>
</template>
</el-table-column>
</el-table>
@ -321,6 +319,11 @@ const listQuery = {
limit: 20,
search: ''
}
const listQuery1 = {
page: 1,
limit: 20,
search: ''
}
//
const defaultObj = {
id: '',
@ -366,6 +369,7 @@ export default {
}
return {
listQuery: Object.assign({}, listQuery),
listQuery1: Object.assign({}, listQuery1),
source: defaultObj,
threshold: defaultObjT,
search: '',
@ -406,10 +410,14 @@ export default {
hindex(index) {
return (this.listQuery.page - 1) * this.listQuery.limit + index + 1
},
//
hindex1(index) {
return (this.listQuery1.page - 1) * this.listQuery1.limit + index + 1
},
//
getList() {
this.listLoading = true
getSourceList().then(response => {
getSourceList(this.listQuery1).then(response => {
this.sourceData = response.data
this.listLoading = false
})